text: webpackJsonp([2],{1451:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(23),a=n(14),s=n(159),l=n(7),c=n(6),u=n(122),d=n(75),p=n(574),f=n(1476),h=n(2008),m=n(1871),g=n(1544),v=n(1563),_=n(1874),b=n(2025),y=n(1468),w=n(1984),E=n(1691),k=n(2001),x=n(1543),S=n(3),C=n(77),M=n(1528),A=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._log=c.Monitoring.Logging.getLogger("denali.editorContent"),t._wootricViewModelImpl=t.props.userAccount.features.denali.wootric.filter(function(){return!t.props.userAccount.profile.get().isTest}).map(function(e){return new s.Wootric.WootricViewModelImpl(new s.Wootric.WootricListenerModelImpl(localStorage,t.props.userAccount.features.denali.wootricTest,e),t.props.engineStream.switchMap(function(e){return e.flatMap(function(e){return e.toOption()}).map(function(e){return e.alertsList.alertEvents.filter(function(e){return"alert_applied"===e.kind}).mapTo(S.RxUtils.voidValue)}).getOrElse(o.Observable.empty())}))}),t}return r.__extends(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.docId,r=t.userAccount,a=t.networkState,s=t.selfUpdate,l=t.uploadViewModel,c=t.notifications,u=t.ded,p=t.engineStream;return i.createElement(d.Lifecycle,{key:n,onMount:function(t){return e._log.info("denali page mount"),document.body.classList.add(M.body),document.body.classList.remove("editorTs"),document.body.parentElement.classList.add(M.root),e.context.screen.update(),t?o.Observable.fromEvent(t,"wheel").subscribe(function(e){e.preventDefault()}):void 0},onUnmount:function(){e._log.info("denali page unmount"),document.body.classList.remove(M.body),document.body.classList.add("editorTs"),document.body.parentElement.classList.remove(M.root)}},i.createElement(x.PreloadComponent,null),p.map(function(t){return t.map(function(t){return t.fold(function(t){return t.code===C.Reconnect.WsCodes.NOT_FOUND?(e._log.warn("document not found on init",t),i.createElement(b.DocumentNotFound,{key:"404"})):(t.code===C.Reconnect.WsCodes.UNAUTHORIZED?e._log.warn("unauthorized on init",t):e._log.warn("engine init error",t),i.createElement(E.DenaliNotificationCenter,{key:"denaliNotificationCenter2",wootricViewModel:e._wootricViewModelImpl,notifications:c,denaliEditorModel:u}))},function(t){return i.createElement(_.Main,{key:"main",denaliEditorModel:u,engine:t,uploadViewModel:l,wootricViewModel:e._wootricViewModelImpl,userAccount:r,networkState:a,selfUpdate:s,notifications:c,docId:n})})}).getOrElse(i.createElement(E.DenaliNotificationCenter,{key:"denaliNotificationCenter",wootricViewModel:e._wootricViewModelImpl,notifications:c,denaliEditorModel:u}))}).startWith(i.createElement(E.DenaliNotificationCenter,{key:"denaliNotificationCenter",wootricViewModel:this._wootricViewModelImpl,notifications:c,denaliEditorModel:u})),i.createElement(y.DenaliTooltipElement,{key:"tooltip"}),i.createElement(w.DropZone,{documentUpload:l.uploadModel,notifications:c}))},t}(u.BaseComponent),O=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._uploadViewModel=new m.UploadViewModelImpl(t.props.doxApi,t.context.appRouter,t.props.notifications,t.context.telemetry,t.props.browser),t._docId=l.Atom.create(a.Option.of(Number(t.props.docId))),t}return r.__extends(t,e),t.prototype._renderPageDoc=function(e){var t=this,n=this.props,r=n.notifications,a=n.userAccount,l=n.networkState,c=n.browser,d=n.doxApi,m=n.wsConnectivity,_=n.selfUpdate,b=this.context,y=b.appConfig,w=b.telemetry,E=new f.DEd({classes:M,freezeFocusFeature:!0,allowNavigationTo:function(e){return s.Wootric.isWootricTextArea(e)||v.SearchViewModel.isSearchInput(e)},shouldFocusEditor:g.InlineCardVM.isInlineCard,placeholder:{strings:this.context.textResources.denali.placeholder,uploadInputAccept:"safari"===c?p.Documents.ACCEPTED_UPLOAD_MIME_TYPES.join(","):p.Documents.ACCEPTED_UPLOAD_EXTENSIONS.join(","),upload:function(e){return t._uploadViewModel.uploadModel.upload(e,!1)}}}),x=S.RxUtils.promiseToStream(function(){return h.StEngine.create(y,w,d,m,E,""+e,a.settings,a.features,r)});return i.createElement(u.BasePage,{key:"base-page-"+e,title:x.switchMap(function(e){return e.flatMap(function(e){return e.toOption()}).map(function(e){return e.documentModel.title}).getOrElse(o.Observable.of("Grammarly"))}).map(function(e){return e||"Grammarly"})},i.createElement("div",null,i.createElement(A,{key:"denali-editor-content",docId:""+e,notifications:r,userAccount:a,networkState:l,uploadViewModel:this._uploadViewModel,ded:E,engineStream:x,selfUpdate:_}),i.createElement(k.DenaliEditorLoader,{key:"loader",engineStream:x,uploadVM:this._uploadViewModel,features:a.features})))},t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.componentWillReceiveProps=function(e){var t=Number(e.docId);this._docId.set(a.Option.of(t))},t.prototype.render=function(){var e=this;return i.createElement(l.F.div,null,this._docId.view(function(t){return t.filter(function(e){return!isNaN(e)}).fold(function(){return i.createElement(u.BasePage,{title:"Grammarly"},i.createElement(b.DocumentNotFound,{key:"404"}))},function(t){return e._renderPageDoc(t)})}))},t}(u.BaseComponent);t.DenaliEditorPage=O},1461:function(e,t,n){"use strict";function r(e){return a.createElement(l.BaseButton,o.__assign({},i(e,c.button)))}function i(e,t){var n=s.classes(e.className,t).className;return o.__assign({},e,{className:n})}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),a=n(13),s=n(7),l=n(1559),c=n(1516),u=n(573);t.Button=r,function(e){e.Blue=function(e){return a.createElement(l.BaseButton,o.__assign({},i(e,c.blue)))},e.White=function(e){return a.createElement(l.BaseButton,o.__assign({},i(e,c.white)))},e.Grey=function(e){return a.createElement(l.BaseButton,o.__assign({},i(e,c.grey)))},e.Caps=function(e){return a.createElement(l.BaseButton,o.__assign({},i(e,c.caps)))},e.Round=function(e){return a.createElement(l.BaseButton,o.__assign({},i(e,c.round)))},e.Flat=function(e){return a.createElement(l.BaseButton,o.__assign({},i(e,c.flat)))},e.SidebarFlat=function(e){return a.createElement(l.BaseButton,o.__assign({},i(e,c.sidebarFlat)))},e.Group=function(e){var t=e.children,n=e.className,r=e.sticky;return a.createElement(s.F.div,o.__assign({},s.classes(n,r?c.groupSticky:c.group)),t)}}(r=t.Button||(t.Button={})),t.appendClassToProps=i,t.InfoButton=function(e){var t=e.title,n=e.titleAlign,i=e.buttonClass,o=e.iconClass,l=e.iconWidth,c=e.tooltipClass;return a.createElement(r,{name:"info-button",title:a.createElement(s.F.div,{className:c},a.createElement("p",null,t)),titleAlign:n,className:i},a.createElement(u.Icon.Info,{width:l,className:o}))}},1463:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(2),o=n(14),a=n(575),s=n(1476),l=n(3),c=n(1464),u=n(1512),d=n(1503);!function(e){e.api="api",e.sidebar="sidebar",e.text="text"}(r=t.AlertActionSource||(t.AlertActionSource={}));var p;!function(e){e.mock={action:a.FeedbackType.LOOKED,commit:l.noop,undo:function(){return[]}},e.mockAction=function(){return e.mock}}(p=t.Undoable||(t.Undoable={}));!function(e){e.mock={_applyAlert:p.mockAction,_alertFeedback:p.mockAction,_dismissBatch:p.mockAction,_hideAlert:l.noop}}(t.InternalAlertOps||(t.InternalAlertOps={}));var f=function(){function e(e,t,n,r){var i=this;this._positionManager=e,this._alertId=t,this._rangesMap=new Map,this._ranges={highlight:new Set,replace:new Set,applied:new Set},this._pendingRanges=[],this._rangesIndex=0;var o=new Map;this._registerRanges(r.map(function(e){return 1===e.length?e.widen():e}),function(e){return i._ranges.highlight.add(e)},o,this._alertId),this._registerRanges(n,function(e){return i._ranges.replace.add(e)},o),this.highlightRange=this._getFirstRange(this._ranges.highlight),this.replaceRange=this._getFirstRange(this._ranges.replace)}return e.register=function(t,n,r,i){return new e(t,n,r,i)},e.prototype._getFirstRange=function(e){return this._rangesMap.get(e.values().next().value)},e.prototype.enqueueRanges=function(e,t){var n=this;this._cleanupPendingRanges();var r=new Map;this._registerRanges(t.map(function(e){return 1===e.length?e.widen():e}),function(e){return n._pendingRanges.push(["highlight",e])},r,this._alertId),this._registerRanges(e,function(e){return n._pendingRanges.push(["replace",e])},r)},Object.defineProperty(e.prototype,"pending",{get:function(){return this._pendingRanges.length>0},enumerable:!0,configurable:!0}),e.prototype._deregisterRange=function(e){this._rangesMap.delete(e)&&this._positionManager.deregisterRange(e)},e.prototype._cleanupPendingRanges=function(){var e=this;this._pendingRanges.forEach(function(t){var n=(t[0],t[1]);return e._deregisterRange(n)}),this._pendingRanges=[]},e.prototype._clearRanges=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];t.forEach(function(t){t.forEach(function(t){return e._deregisterRange(t)}),t.clear()})},e.prototype.applyPendingRangesUpdate=function(){var e=this;if(!this.pending)return o.None;var t=Array.from(this._ranges.highlight).map(function(t){return e._rangesMap.get(t)});this._clearRanges(this._ranges.highlight,this._ranges.replace);var n=this._pendingRanges.filter(function(e){return"highlight"===e[0]}).map(function(t){var n=(t[0],t[1]);return e._rangesMap.get(n)});return this._pendingRanges.forEach(function(t){var n=t[0],r=t[1];return e._ranges[n].add(r)}),this._pendingRanges=[],this.highlightRange=this._getFirstRange(this._ranges.highlight),this.replaceRange=this._getFirstRange(this._ranges.replace),o.Some({addedHighlightedRanges:n,removedHighlightedRanges:t})},e.prototype._registerRanges=function(e,t,n,r){var i=this;e.forEach(function(e){var o,a=e.start+","+e.end;n&&n.has(a)?o=n.get(a):(o=b.getRangeId(i._alertId,e.type,i._rangesIndex++),i._rangesMap.set(o,r?i._positionManager.registerRange(o,e,r):i._positionManager.registerRange(o,e)),n&&n.set(a,o)),t(o)})},Object.defineProperty(e.prototype,"appliedRange",{get:function(){return this._ranges.applied.size>0?o.Some(this._getFirstRange(this._ranges.applied).narrow()):o.None},enumerable:!0,configurable:!0}),e.prototype.registerAppliedRange=function(){var e=this;Array.from(this._ranges.highlight).concat(Array.from(this._ranges.replace)).map(function(t){return e._rangesMap.get(t)}).reduce(function(e,t){return e.map(function(e){return{s:Math.min(e.s,t.start),e:Math.max(e.e,t.end)}}).orElseL(function(){return o.Some({s:t.start,e:t.end})})},o.Option.empty()).forEach(function(t){var n=new s.Range(t.s,t.e,b.RangeType.APPLY).widen();e._registerRanges([n],function(t){return e._ranges.applied.add(t)})})},e.prototype.dispose=function(){var e=this;this._rangesMap.forEach(function(t,n){return e._positionManager.deregisterRange(n)}),this._rangesMap.clear()},e}(),h=function(){function e(e,t,n,r,i){void 0===r&&(r=new s.Range(e.begin,e.end,b.RangeType.REPLACE)),void 0===i&&(i=new s.Range(e.highlightBegin,e.highlightEnd,b.RangeType.HIGHLIGHT)),this._raw=e,this._ops=t,this._positionManager=n,this._replaceRange=r,this._highlightRange=i,this._disposed=!1,this.id=this._raw.id+"_"+(v.idCounter++).toString(),this.rawId=this._raw.id,this.priority=0,this.belongsToAllAlerts=!1,this.patternName=this._raw.pname,this.isFree=this._raw.free,this.lensPriority=this._raw.cardLayout&&this._raw.cardLayout.rank||0,this.isRead=this._raw.isRead||!1,this.highlightText=this._raw.highlightText,this.replaceText=this._raw.text,this._isValid=!0,void 0!==e.transforms&&l.invariant(e.transforms.length===e.replacements.length,"Every transform should have replacement, bro, tr: "+e.transforms+", rep: "+e.replacements+". AlertId: "+e.id),this.doRegisterRanges(this._replaceRange,this._highlightRange)}return e.prototype.invalidate=function(){return this._isValid=!1,this},Object.defineProperty(e.prototype,"isValid",{get:function(){return this._isValid},enumerable:!0,configurable:!0}),e.prototype.updateRawAlert=function(e){this._isValid=!0,this._raw=e},e.prototype.enqueueRawAlertForUpdate=function(e){this._raw=e,this._alertRangeManager.enqueueRanges([new s.Range(e.begin,e.end,this._replaceRange.type)],[new s.Range(e.highlightBegin,e.highlightEnd,this._highlightRange.type)])},Object.defineProperty(e.prototype,"hasNewRangeForUpdate",{get:function(){return this._alertRangeManager.pending},enumerable:!0,configurable:!0}),e.prototype.applyPendingRangesUpdate=function(){return this._alertRangeManager.applyPendingRangesUpdate()},Object.defineProperty(e.prototype,"highlightRange",{get:function(){return this._alertRangeManager.highlightRange},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"replaceRange",{get:function(){return this._alertRangeManager.replaceRange},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"appliedRange",{get:function(){return this._alertRangeManager.appliedRange},enumerable:!0,configurable:!0}),e.prototype.registerAppliedRange=function(){return this._alertRangeManager.registerAppliedRange()},e.prototype.apply=function(e,t){return void 0===t&&(t=r.api),l.invariant(!this._disposed,"Cannot apply already disposed "+this.id),this._ops._applyAlert(this,this._raw.replacements[e],t)},e.prototype.sendFeedback=function(e,t){return l.invariant(!this._disposed,"Cannot send feedback for already disposed "+this.id),this._ops._alertFeedback(this,e,t)},e.prototype.dismissBatch=function(e){return e.forEach(function(e){return l.invariant(!e._disposed,"Cannot send feedback for already disposed "+e.id)}),this._ops._dismissBatch(e)},e.prototype.dispose=function(){l.invariant(!this._disposed,"Cannot dispose already disposed "+this.id),this._disposed=!0,this.deregisterRanges()},e.prototype.hideApplied=function(){this._ops._hideAlert(this.id)},e.prototype.equals=function(e){return this.id===e.id},e.prototype.isDuplicate=function(e){return this.highlightRange.start===e.highlightRange.start&&this.highlightRange.end===e.highlightRange.end&&this.highlightText===e.highlightText&&this.patternName===e.patternName&&this.title===e.title&&this.lensId===e.lensId},e.prototype.toString=function(){return"Alert: "+JSON.stringify(this,void 0,0)},e.prototype.toJSON=function(){return{id:this.id,hrange:this.highlightRange,rrange:this.replaceRange,arange:this.appliedRange.orNull(),lensId:this.lensId,alertType:this.alertType,category:this._raw.category,disposed:this._disposed}},e.prototype.toRawAlert=function(){return i.__assign({},this._raw,{isRead:this.isRead,begin:this.replaceRange.start,end:this.replaceRange.end,highlightBegin:this.highlightRange.start,highlightEnd:this.highlightRange.end})},e.prototype.toAlertLike=function(){return{group:this._raw.group,category:this._raw.category,categoryHuman:this._raw.categoryHuman}},e.prototype.registerRanges=function(){return this.doRegisterRanges(this._replaceRange,this._highlightRange),this},e.prototype.deregisterRanges=function(){return this._alertRangeManager.dispose(),this},e.prototype.doRegisterRanges=function(e,t){this._alertRangeManager=f.register(this._positionManager,this.id,[e],[t])},e.idCounter=0,e}();t.BaseAlertImpl=h;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.title="",t.alertType=c.Lens.Type.Advanced,t.lensId=c.Lens.SpecialId.Premium,t.group=t._raw.group,t.category=t._raw.category,t.categoryHuman=t._raw.categoryHuman,t.allowDuplicates=!0,t.hasLongHighlight=!0,t.allowUpdate=!1,t.isRead=!0,t.counters={critical:0,advanced:1,unread:0,textLength:0},t}return i.__extends(t,e),t.prototype.copy=function(){return this},t.prototype.sendFeedback=function(){return p.mock},t}(h);t.PremiumAlertImpl=m;var g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.alertType=c.Lens.Type.Originality,t.lensId=c.Lens.SpecialId.Plagiarism,t.isFree=!1,t.allowDuplicates=!0,t.hasLongHighlight=!0,t.allowUpdate=!1,t.counters={critical:0,advanced:0,unread:0,textLength:t._raw.highlightText.length},t.plagiarismType=t._parseExtraProps(t._raw.extra_properties),t.percent=parseInt(t._raw.extra_properties.percent||"0",10),t.title=t._raw.extra_properties.title||"",t.cardId=JSON.stringify({title:t.title,source:t.plagiarismType.source}),t.isRead=!0,t}return i.__extends(t,e),t.prototype._parseExtraProps=function(e){return"PUBLICATION"===e.source?{source:"publication",authors:o.Option.of(e.authors),citationStyle:{apa:e.reference_apa||"",chicago:e.reference_chicago||"",mla:e.reference_mla||""}}:{source:"web",url:o.Option.of(e.url)}},t.prototype.copy=function(){l.invariant(!this._disposed,"Cannot copy disposed alert!");var e=new t(this._raw,this._ops,this._positionManager,this.replaceRange.copy(),this.highlightRange.copy());return this.isValid||e.invalidate(),e.isRead=this.isRead,e},t}(h);t.PlagiarismAlertImpl=g;var v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lensId=t._raw.cardLayout.group,t.alertType=t._raw.free?c.Lens.Type.Critical:c.Lens.Type.Advanced,t.allowDuplicates=!1,t.hasLongHighlight=b.isLongHighlight(t),t.allowUpdate=!1,t.title=t._raw.title,t.explanation=t._raw.explanation,t.details=l.NotEmpty.string(t._raw.details),t.examples=u.AlertExample.parse(t._raw.examples),t.replacementsLabels=d.ReplacementsLabels.parse(t._raw),t.extraProperties=t._parseExtraProps(t._raw.extra_properties),t.priority=t.extraProperties.priority,t.belongsToAllAlerts=!0,t}return i.__extends(t,e),Object.defineProperty(t.prototype,"counters",{get:function(){return{critical:Number(this.alertType===c.Lens.Type.Critical),advanced:Number(this.alertType===c.Lens.Type.Advanced),unread:Number(!this.isRead),textLength:0}},enumerable:!0,configurable:!0}),t.prototype.copy=function(){l.invariant(!this._disposed,"Cannot copy disposed alert!");var e=new t(this._raw,this._ops,this._positionManager,this.replaceRange.copy(),this.highlightRange.copy());return this.isValid||e.invalidate(),e.isRead=this.isRead,e},t.prototype._parseExtraProps=function(e){return{hasAddToDictionary:"true"===e.add_to_dict,didYouMean:"true"===e.did_you_mean,showTitle:"true"===e.show_title,isEnhancement:"true"===e.enhancement,priority:parseInt(e.priority||"0",10)}},t}(h);t.AlertImpl=v;var _=function(e){function t(t,n,r,i,o){void 0===i&&(i=new s.Range(t.begin,t.end,b.RangeType.REPLACE)),void 0===o&&(o=new s.Range(t.highlightBegin,t.highlightEnd,b.RangeType.HIGHLIGHT_IGNORE));var a=e.call(this,t,n,r,i,o)||this;return a.title="",a.lensId=c.Lens.SpecialId.Readability,a.alertType=c.Lens.Type.Advanced,a.allowDuplicates=!0,a.hasLongHighlight=!0,a.allowUpdate=!0,a}return i.__extends(t,e),t.prototype.copy=function(){l.invariant(!this._disposed,"Cannot copy disposed alert!");var e=new t(this._raw,this._ops,this._positionManager,this.replaceRange.copy(),this.highlightRange.copy());return this.isValid||e.invalidate(),e.isRead=this.isRead,e},t}(v);t.ReadabilityAlertImpl=_;var b;!function(e){function t(e,t){var n="alert#"+String(O++);return i.__assign({},a.RawAlert.mock,{id:n,cardLayout:{category:"Clarity",group:"Lens "+e,groupDescription:"Checks spelling, confused words, capitalization",rank:e}},t)}function n(e){return Math.trunc(Math.random()*e)}function r(e,n,r){T+=30;var i=r&&"number"==typeof r.start?r.start:T,o=r&&"number"==typeof r.end?r.end:i+1,a=t(e,n),s={begin:i,end:o,highlightBegin:i,highlightEnd:o};return Object.assign(a,s),a}function u(e,t,r){var o=r&&r.start||n(T+=1),s=i.__assign({},a.RawAlert.mockPlagiarism,t),l=r&&r.end||o+1+n(20),c={begin:o,end:l,highlightBegin:o,highlightEnd:l,highlightText:e};return Object.assign(s,c),s}function d(e){var t=e.patternName;return N.has(t)}function p(e){return e.alertType===c.Lens.Type.Originality}function f(e){return e.lensId===c.Lens.SpecialId.Readability}function h(e){return e.lensId===c.Lens.SpecialId.Premium}function b(e){return e instanceof v}function y(t){return!e.isPlagiarism(t)&&!e.isReadability(t)}function w(e,t){return e.source===t.source&&("web"===e.source&&t.url.equals(e.url)||"publication"===e.source&&t.authors.equals(e.authors))}function E(e,t){return e.title===t.title&&w(e.plagiarismType,t.plagiarismType)}function k(e,t){var n=l.ArrayUtils.lowerBound(e,function(e){return t>=e.highlightRange.end}),r=o.Option.of(e[n]),i=o.Option.of(e[n-1]);return r.map(function(e){return i.fold(function(){return e},function(n){return e.highlightRange.start-t<=t-n.highlightRange.end?e:n})}).orElse(i)}function x(e,t,n){return a.RawAlert.isHidden(e)?new m(e,t,n):a.RawAlert.isPlagiarism(e)?new g(e,t,n):a.RawAlert.isReadability(e)?new _(e,t,n):new v(e,t,n)}function S(t){return e.CRITICAL_GROUPS.has(t)}function C(t){if(e.isPremium(t))return c.Lens.Info.premium;if(e.isPlagiarism(t))return c.Lens.Info.plagiarism;if(e.isReadability(t))return c.Lens.Info.readability;var n=t._raw.cardLayout;return{id:t.lensId,title:t.lensId,description:n.groupDescription,type:S(n.group)?c.Lens.Type.Critical:c.Lens.Type.Advanced,category:n.category,priority:n.rank,exclusiveHighlights:!1}}function M(e,t,n){return""+e+s.Range.AlertIdDelimiter+t+n}function A(e){var t=e.indexOf(s.Range.AlertIdDelimiter);return t<0?e:e.substring(0,t)}!function(e){e.REPLACE="r",e.HIGHLIGHT="h",e.HIGHLIGHT_IGNORE="hi",e.APPLY="a"}(e.RangeType||(e.RangeType={})),e.comparator=function(e,t){return e.highlightRange.end<t.highlightRange.end?-1:e.highlightRange.end>t.highlightRange.end?1:e.id===t.id?0:e.id<t.id?-1:1};var O=1,T=0;e.generate=r,e.generatePlagiarism=u;var N=new Set(["Grammar/Conjunctions/SoVsNeither/SoIONeitherNor","SentenceStructure/Fragment/Fragment/NounPhraseParagraph","SentenceStructure/Fragment/Fragment/NounPhrase","SentenceStructure/Fragment/Fragment/InfinitivePhrase","SentenceStructure/Fragment/Fragment/ThatInNP","SentenceStructure/Fragment/Fragment/SubordinateClause","SentenceStructure/Fragment/Fragment/ParticiplePhrase","SentenceStructure/Fragment/IncompleteComparison/Case1","SentenceStructure/Fragment/IncompleteComparison/Case2","SentenceStructure/Fragment/IncompleteComparison/Case3","SentenceStructure/Fragment/NoInfinitive/AskTo","SentenceStructure/Fragment/NoSubject/Case3","SentenceStructure/Fragment/NoSubject/Case2","SentenceStructure/Fragment/NoSubject/Case1","SentenceStructure/Fragment/NoSubject/InQuestion","SentenceStructure/Fragment/NoVerb/WhoFollowedByBe","SentenceStructure/Parallelism/ParallelSoDoI/WillAfterCC","Style/TooFormal/Subjunctive/General","Style/Clarity/LongSentence/General"]);e.isLongHighlight=d,e.isPlagiarism=p,e.isReadability=f,e.isPremium=h,e.isAlert=b,e.isCacheable=y,e.isPlagiarismSourceEqual=E,e.findClosest=k,e.create=x,e.CRITICAL_GROUPS=new Set(["Spelling","Grammar","Punctuation","Fluency","Conventions"]),e.isCriticalGroup=S,e.toLens=C,e.getRangeId=M,e.fromRangeIdToAlertId=A}(b=t.Alert||(t.Alert={}))},1464:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3);!function(e){function t(t){return function(n){switch(t){case e.Type.Critical:return n.critical;case e.Type.Advanced:return n.advanced;case e.Type.Originality:case e.Type.Other:throw new r.InvariantError("Don't use this function for Originality/Other type");default:return r.assertNever(t)}}}function n(t){return function(n){switch(t){case e.Type.Critical:return n.critical;case e.Type.Advanced:return n.advanced;case e.Type.Originality:return n.plagiarism;case e.Type.Other:throw new r.InvariantError("Don't use this function for Other type");default:return r.assertNever(t)}}}function i(e,t){return d[e.type]-d[t.type]||e.priority-t.priority}function o(e,t,n){void 0===t&&(t=u.empty);var i=r.ObjectUtils.update(f.base,e);return new p(i,t,{},n)}function a(){return o(f.plagiarism)}function s(){return o(f.premium)}function l(){return o(f.readability)}function c(e){return o(f.allIssues,e,function(e){return e.belongsToAllAlerts})}!function(e){e.Plagiarism="Originality",e.Premium="Hidden",e.Proofit="Proofit",e.Closed="Closed",e.Success="Success",e.AllIssues="All issues",e.Readability="Readability mismatch"}(e.SpecialId||(e.SpecialId={}));!function(e){e.Critical="Critical",e.Advanced="Advanced",e.Originality="Originality",e.Other="Other"}(e.Type||(e.Type={}));!function(e){e.Accuracy="Accuracy",e.Clarity="Clarity",e.Effectiveness="Effectiveness",e.Originality="Originality",e.Hidden="Hidden"}(e.Category||(e.Category={}));var u;!function(e){e.empty={count:0,unreadCount:0,percentile:0,textLength:0},e.first=function(e,t){return void 0===e&&(e=1),void 0===t&&(t=0),{count:1,unreadCount:e,percentile:0,textLength:t}},e.fromAlert=function(e){return{count:1,unreadCount:e.unread,textLength:e.textLength,percentile:0}},e.join=function(e,t){return{count:e.count+t.count,unreadCount:e.unreadCount+t.unreadCount,textLength:e.textLength+t.textLength,percentile:e.percentile+t.percentile}},e.reverse=function(e){return{count:-e.count,unreadCount:-e.unreadCount,textLength:-e.textLength,percentile:-e.percentile}}}(u=e.Meta||(e.Meta={})),e.typeMatch=t,e.fullTypeMatch=n;var d={Critical:0,Advanced:1,Originality:2,Other:3};e.getSortOrder=function(e){return d[e]},e.comparator=i;var p=function(){function e(e,t,n,r){void 0===r&&(r=function(t){return t.lensId===e.id}),this.info=e,this.meta=t,this._ops=n,this.filter=r}return Object.defineProperty(e.prototype,"title",{get:function(){return this.info.title},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this.info.type},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"category",{get:function(){return this.info.category},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"description",{get:function(){return this.info.description},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"priority",{get:function(){return this.info.priority},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this.meta.count},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"unreadCount",{get:function(){return this.meta.unreadCount},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"percentile",{get:function(){return this.meta.percentile},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textLength",{get:function(){return this.meta.textLength},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this.info.id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"exclusiveHighlights",{get:function(){return this.info.exclusiveHighlights},enumerable:!0,configurable:!0}),e.prototype.dismissAll=function(){return this._ops._dismissAll(this)},e.prototype.appendMeta=function(t){return new e(this.info,u.join(this.meta,t),this._ops,this.filter)},e.prototype.equals=function(e){return this.id===e.id&&this.count===e.count&&this.unreadCount===e.unreadCount&&this.percentile===e.percentile&&this.priority===e.priority},e.prototype.toString=function(){return JSON.stringify(this,void 0,2)},e.prototype.toJSON=function(){return{id:this.id,type:this.type,count:this.count,unreadCount:this.unreadCount,priority:this.priority}},e}();e.LensImpl=p;var f;!function(t){function n(e){return r.ObjectUtils.update(t.base,e)}t.base={id:"Base",type:e.Type.Other,category:e.Category.Hidden,title:"Base Lens",description:"",priority:0,exclusiveHighlights:!1},t.create=n,t.plagiarism=n({id:e.SpecialId.Plagiarism,type:e.Type.Originality,category:e.Category.Originality,title:"Plagiarism",exclusiveHighlights:!0}),t.premium=n({id:e.SpecialId.Premium,type:e.Type.Advanced,title:"Premium"}),t.allIssues=n({id:e.SpecialId.AllIssues,type:e.Type.Critical,title:"All Issues"}),t.readability=n({id:e.SpecialId.Readability,type:e.Type.Advanced,category:e.Category.Clarity,title:"Readability",priority:400})}(f=e.Info||(e.Info={})),e.createEmptyLens=o,e.createEmptyPlagiarismLens=a,e.createEmptyPremiumLens=s,e.createEmptyReadabilityLens=l,e.createEmptyAllIssuesLens=c}(t.Lens||(t.Lens={}))},1465:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(14),i=n(3),o=n(1647);t.Card=o.Card;!function(e){e.forceText="forceText",e.forceSidebar="forceSidebar"}(t.ForceAlertActionSource||(t.ForceAlertActionSource={}));var a;!function(e){e.lensview="lensview",e.advanced="advanced",e.plagiarism="plagiarism",e.proofit="proofit",e.success="success",e.closed="closed"}(a=t.LensViewType||(t.LensViewType={}));var s;!function(e){e.always="always",e.optional="optional",e.never="never"}(s=t.CardAppearance||(t.CardAppearance={}));!function(e){function t(e,t,n){return function(r){switch(r.currentLens.cardAppearance){case s.always:return e(r);case s.optional:return t(r);case s.never:return n(r);default:return i.assertNever(r.currentLens)}}}function n(e,n){return t(e,n,function(){return r.None})}function o(e){return function(t){return t.currentLens.id===e}}function l(e){return e.currentLens.type===a.lensview}function c(e){return e.currentLens.cardAppearance===s.always||e.currentLens.cardAppearance===s.optional}e.genericMapper=t,e.mapper=n,e.getActiveAlert=function(t){return e.getActiveCard(t).map(function(e){return e.activeAlert})},e.getActiveCard=n(function(e){var t=e.currentLens;return r.Some(t.card)},function(e){return e.currentLens.card}),e.is=o,e.isLensview=l,e.hasCards=c}(t.LensState||(t.LensState={}));!function(e){!function(e){function t(e){return{state:e,cardsToAdd:[],cardsToRemove:[]}}e.fromState=t}(e.Event||(e.Event={}));!function(e){e[e.WITH_ALL_ALERTS=0]="WITH_ALL_ALERTS",e[e.WITHOUT_ALL_ALERTS=1]="WITHOUT_ALL_ALERTS"}(e.Mode||(e.Mode={}))}(t.LensStateProvider||(t.LensStateProvider={})),t.idFinder=function(e){return function(t){return t.id===e.id}}},1466:function(e,t,n){"use strict";function r(e,t){function n(){e.classList.add("ps--focus")}function r(){e.classList.remove("ps--focus")}var i=this;i.settings=l();for(var o in t)i.settings[o]=t[o];i.containerWidth=null,i.containerHeight=null,i.contentWidth=null,i.contentHeight=null,i.isRtl="rtl"===c.css(e,"direction"),i.isNegativeScroll=function(){var t=e.scrollLeft,n=null;return e.scrollLeft=-1,n=e.scrollLeft<0,e.scrollLeft=t,n}(),i.negativeScrollAdjustment=i.isNegativeScroll?e.scrollWidth-e.clientWidth:0,i.event=new u,i.ownerDocument=e.ownerDocument||document,i.scrollbarXRail=c.appendTo(c.create("div","ps__scrollbar-x-rail"),e),i.scrollbarX=c.appendTo(c.create("div","ps__scrollbar-x"),i.scrollbarXRail),i.scrollbarX.setAttribute("tabindex",0),i.event.bind(i.scrollbarX,"focus",n),i.event.bind(i.scrollbarX,"blur",r),i.scrollbarXActive=null,i.scrollbarXWidth=null,i.scrollbarXLeft=null,i.scrollbarXBottom=s.toInt(c.css(i.scrollbarXRail,"bottom")),i.isScrollbarXUsingBottom=i.scrollbarXBottom===i.scrollbarXBottom,i.scrollbarXTop=i.isScrollbarXUsingBottom?null:s.toInt(c.css(i.scrollbarXRail,"top")),i.railBorderXWidth=s.toInt(c.css(i.scrollbarXRail,"borderLeftWidth"))+s.toInt(c.css(i.scrollbarXRail,"borderRightWidth")),c.css(i.scrollbarXRail,"display","block"),i.railXMarginWidth=s.toInt(c.css(i.scrollbarXRail,"marginLeft"))+s.toInt(c.css(i.scrollbarXRail,"marginRight")),c.css(i.scrollbarXRail,"display",""),i.railXWidth=null,i.railXRatio=null,i.scrollbarYRail=c.appendTo(c.create("div","ps__scrollbar-y-rail"),e),i.scrollbarY=c.appendTo(c.create("div","ps__scrollbar-y"),i.scrollbarYRail),i.scrollbarY.setAttribute("tabindex",0),i.event.bind(i.scrollbarY,"focus",n),i.event.bind(i.scrollbarY,"blur",r),i.scrollbarYActive=null,i.scrollbarYHeight=null,i.scrollbarYTop=null,i.scrollbarYRight=s.toInt(c.css(i.scrollbarYRail,"right")),i.isScrollbarYUsingRight=i.scrollbarYRight===i.scrollbarYRight,i.scrollbarYLeft=i.isScrollbarYUsingRight?null:s.toInt(c.css(i.scrollbarYRail,"left")),i.scrollbarYOuterWidth=i.isRtl?s.outerWidth(i.scrollbarY):null,i.railBorderYWidth=s.toInt(c.css(i.scrollbarYRail,"borderTopWidth"))+s.toInt(c.css(i.scrollbarYRail,"borderBottomWidth")),c.css(i.scrollbarYRail,"display","block"),i.railYMarginHeight=s.toInt(c.css(i.scrollbarYRail,"marginTop"))+s.toInt(c.css(i.scrollbarYRail,"marginBottom")),c.css(i.scrollbarYRail,"display",""),i.railYHeight=null,i.railYRatio=null}function i(e){return e.getAttribute("data-ps-id")}function o(e,t){e.setAttribute("data-ps-id",t)}function a(e){e.removeAttribute("data-ps-id")}var s=n(1471),l=n(1620),c=n(1473),u=n(1617),d=n(1618),p={};t.add=function(e,t){var n=d();return o(e,n),p[n]=new r(e,t),p[n]},t.remove=function(e){delete p[i(e)],a(e)},t.get=function(e){return p[i(e)]}},1467:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(1557);t.H1=function(e){var t=e.className,n=e.children,s=r.__rest(e,["className","children"]);return i.createElement(o.F.h1,r.__assign({},o.classes(a.header1,t),s),n)},t.H2=function(e){var t=e.className,n=e.children;return i.createElement(o.F.h2,r.__assign({},o.classes(a.header2,t)),n)},t.H3=function(e){var t=e.className,n=e.children,s=r.__rest(e,["className","children"]);return i.createElement(o.F.h3,r.__assign({},o.classes(a.header3,t),s),n)},t.Paper=function(e){var t=e.className,n=e.children;return i.createElement(o.F.span,r.__assign({},o.classes(a.paper,t)),n)},t.P1=function(e){var t=e.className,n=e.children;return i.createElement(o.F.div,r.__assign({},o.classes(a.p1,t)),n)},t.P2=function(e){var t=e.className,n=e.children;return i.createElement(o.F.div,r.__assign({},o.classes(a.p2,t)),n)},t.Small=function(e){var t=e.className,n=e.name,s=e.children;return i.createElement(o.F.small,r.__assign({},o.classes(a.small,t),{"data-name":n}),s)}},1468:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(576),a=n(23),s=n(574),l=n(122),c=n(3),u=n(1475);t.TooltipElement=u.TooltipElement;var d=n(1511);t.DenaliTooltipElement=d.DenaliTooltipElement;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._uuid=s.Tooltip.genUuid(),t}return r.__extends(t,e),t.prototype.componentDidMount=function(){var e=this,t=o.findDOMNode(this);this._subs=[a.Observable.merge(a.Observable.fromEvent(t,"mouseenter").withLatestFrom(c.RxUtils.toObservable(this.props.title),function(e,t){return t}).filter(Boolean).do(function(n){return e.context.tooltip.setContent({target:t,content:n,alignment:e.props.align||"auto",uuid:e._uuid})}),a.Observable.fromEvent(t,"mouseleave").do(function(){return e.context.tooltip.cleanContent(e._uuid)})).subscribe().add(function(){return e.context.tooltip.cleanContent(e._uuid)})]},t.prototype.componentWillUnmount=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},t.prototype.render=function(){return i.Children.only(this.props.children)},t}(l.BaseComponent);t.Tooltip=p},1469:function(e,t,n){"use strict";function r(e,t){return e.settings.minScrollbarLength&&(t=Math.max(t,e.settings.minScrollbarLength)),e.settings.maxScrollbarLength&&(t=Math.min(t,e.settings.maxScrollbarLength)),t}function i(e,t){var n={width:t.railXWidth};t.isRtl?n.left=t.negativeScrollAdjustment+e.scrollLeft+t.containerWidth-t.contentWidth:n.left=e.scrollLeft,t.isScrollbarXUsingBottom?n.bottom=t.scrollbarXBottom-e.scrollTop:n.top=t.scrollbarXTop+e.scrollTop,a.css(t.scrollbarXRail,n);var r={top:e.scrollTop,height:t.railYHeight};t.isScrollbarYUsingRight?t.isRtl?r.right=t.contentWidth-(t.negativeScrollAdjustment+e.scrollLeft)-t.scrollbarYRight-t.scrollbarYOuterWidth:r.right=t.scrollbarYRight-e.scrollLeft:t.isRtl?r.left=t.negativeScrollAdjustment+e.scrollLeft+2*t.containerWidth-t.contentWidth-t.scrollbarYLeft-t.scrollbarYOuterWidth:r.left=t.scrollbarYLeft+e.scrollLeft,a.css(t.scrollbarYRail,r),a.css(t.scrollbarX,{left:t.scrollbarXLeft,width:t.scrollbarXWidth-t.railBorderXWidth}),a.css(t.scrollbarY,{top:t.scrollbarYTop,height:t.scrollbarYHeight-t.railBorderYWidth})}var o=n(1471),a=n(1473),s=n(1466),l=n(1470);e.exports=function(e){var t=s.get(e);t.containerWidth=e.clientWidth,t.containerHeight=e.clientHeight,t.contentWidth=e.scrollWidth,t.contentHeight=e.scrollHeight;var n;e.contains(t.scrollbarXRail)||(n=a.queryChildren(e,".ps__scrollbar-x-rail"),n.length>0&&n.forEach(function(e){a.remove(e)}),a.appendTo(t.scrollbarXRail,e)),e.contains(t.scrollbarYRail)||(n=a.queryChildren(e,".ps__scrollbar-y-rail"),n.length>0&&n.forEach(function(e){a.remove(e)}),a.appendTo(t.scrollbarYRail,e)),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset<t.contentWidth?(t.scrollbarXActive=!0,t.railXWidth=t.containerWidth-t.railXMarginWidth,t.railXRatio=t.containerWidth/t.railXWidth,t.scrollbarXWidth=r(t,o.toInt(t.railXWidth*t.containerWidth/t.contentWidth)),t.scrollbarXLeft=o.toInt((t.negativeScrollAdjustment+e.scrollLeft)*(t.railXWidth-t.scrollbarXWidth)/(t.contentWidth-t.containerWidth))):t.scrollbarXActive=!1,!t.settings.suppressScrollY&&t.containerHeight+t.settings.scrollYMarginOffset<t.contentHeight?(t.scrollbarYActive=!0,t.railYHeight=t.containerHeight-t.railYMarginHeight,t.railYRatio=t.containerHeight/t.railYHeight,t.scrollbarYHeight=r(t,o.toInt(t.railYHeight*t.containerHeight/t.contentHeight)),t.scrollbarYTop=o.toInt(e.scrollTop*(t.railYHeight-t.scrollbarYHeight)/(t.contentHeight-t.containerHeight))):t.scrollbarYActive=!1,t.scrollbarXLeft>=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),i(e,t),t.scrollbarXActive?e.classList.add("ps--active-x"):(e.classList.remove("ps--active-x"),t.scrollbarXWidth=0,t.scrollbarXLeft=0,l(e,"left",0)),t.scrollbarYActive?e.classList.add("ps--active-y"):(e.classList.remove("ps--active-y"),t.scrollbarYHeight=0,t.scrollbarYTop=0,l(e,"top",0))}},1470:function(e,t,n){"use strict";var r=n(1466),i=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t};e.exports=function(e,t,n){if(void 0===e)throw"You must provide an element to the update-scroll function";if(void 0===t)throw"You must provide an axis to the update-scroll function";if(void 0===n)throw"You must provide a value to the update-scroll function";"top"===t&&n<=0&&(e.scrollTop=n=0,e.dispatchEvent(i("ps-y-reach-start"))),"left"===t&&n<=0&&(e.scrollLeft=n=0,e.dispatchEvent(i("ps-x-reach-start")));var o=r.get(e);"top"===t&&n>=o.contentHeight-o.containerHeight&&(n=o.contentHeight-o.containerHeight,n-e.scrollTop<=2?n=e.scrollTop:e.scrollTop=n,e.dispatchEvent(i("ps-y-reach-end"))),"left"===t&&n>=o.contentWidth-o.containerWidth&&(n=o.contentWidth-o.containerWidth,n-e.scrollLeft<=2?n=e.scrollLeft:e.scrollLeft=n,e.dispatchEvent(i("ps-x-reach-end"))),void 0===o.lastTop&&(o.lastTop=e.scrollTop),void 0===o.lastLeft&&(o.lastLeft=e.scrollLeft),"top"===t&&n<o.lastTop&&e.dispatchEvent(i("ps-scroll-up")),"top"===t&&n>o.lastTop&&e.dispatchEvent(i("ps-scroll-down")),"left"===t&&n<o.lastLeft&&e.dispatchEvent(i("ps-scroll-left")),"left"===t&&n>o.lastLeft&&e.dispatchEvent(i("ps-scroll-right")),"top"===t&&n!==o.lastTop&&(e.scrollTop=o.lastTop=n,e.dispatchEvent(i("ps-scroll-y"))),"left"===t&&n!==o.lastLeft&&(e.scrollLeft=o.lastLeft=n,e.dispatchEvent(i("ps-scroll-x")))}},1471:function(e,t,n){"use strict";function r(e){var t,n=["ps--in-scrolling"];return t=void 0===e?["ps--x","ps--y"]:["ps--"+e],n.concat(t)}var i=n(1473),o=t.toInt=function(e){return parseInt(e,10)||0};t.isEditable=function(e){return i.matches(e,"input,[contenteditable]")||i.matches(e,"select,[contenteditable]")||i.matches(e,"textarea,[contenteditable]")||i.matches(e,"button,[contenteditable]")},t.removePsClasses=function(e){for(var t=0;t<e.classList.length;t++){var n=e.classList[t];0===n.indexOf("ps-")&&e.classList.remove(n)}},t.outerWidth=function(e){return o(i.css(e,"width"))+o(i.css(e,"paddingLeft"))+o(i.css(e,"paddingRight"))+o(i.css(e,"borderLeftWidth"))+o(i.css(e,"borderRightWidth"))},t.startScrolling=function(e,t){for(var n=r(t),i=0;i<n.length;i++)e.classList.add(n[i])},t.stopScrolling=function(e,t){for(var n=r(t),i=0;i<n.length;i++)e.classList.remove(n[i])},t.env={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof window&&null!==window.navigator.msMaxTouchPoints}},1472:function(e,t,n){(function(t){/*!
   * Quill Editor v1.2.6
   * https://quilljs.com/
   * Copyright (c) 2014, Jason Chen
   * Copyright (c) 2013, salesforce.com
   */
  !function(t,n){e.exports=n()}(0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=137)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(21),i=n(22),o=n(23),a=n(59),s=n(58),l=n(56),c=n(57),u=n(60),d=n(13),p=n(32),f=n(34),h=n(33),m=n(1),g={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:r.default,Format:i.default,Leaf:o.default,Embed:c.default,Scroll:a.default,Block:l.default,Inline:s.default,Text:u.default,Attributor:{Attribute:d.default,Class:p.default,Style:f.default,Store:h.default}};t.default=g},function(e,t,n){"use strict";function r(e,t){var n=o(e);if(null==n)throw new l("Unable to create "+e+" blot");var r=n;return new r(e instanceof Node||e.nodeType===Node.TEXT_NODE?e:r.create(t),t)}function i(e,n){return void 0===n&&(n=!1),null==e?null:null!=e[t.DATA_KEY]?e[t.DATA_KEY].blot:n?i(e.parentNode,n):null}function o(e,t){void 0===t&&(t=f.ANY);var n;if("string"==typeof e)n=p[e]||c[e];else if(e instanceof Text||e.nodeType===Node.TEXT_NODE)n=p.text;else if("number"==typeof e)e&f.LEVEL&f.BLOCK?n=p.block:e&f.LEVEL&f.INLINE&&(n=p.inline);else if(e instanceof HTMLElement){var r=(e.getAttribute("class")||"").split(/\s+/);for(var i in r)if(n=u[r[i]])break;n=n||d[e.tagName]}return null==n?null:t&f.LEVEL&n.scope&&t&f.TYPE&n.scope?n:null}function a(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length>1)return e.map(function(e){return a(e)});var n=e[0];if("string"!=typeof n.blotName&&"string"!=typeof n.attrName)throw new l("Invalid definition");if("abstract"===n.blotName)throw new l("Cannot register abstract class");if(p[n.blotName||n.attrName]=n,"string"==typeof n.keyName)c[n.keyName]=n;else if(null!=n.className&&(u[n.className]=n),null!=n.tagName){Array.isArray(n.tagName)?n.tagName=n.tagName.map(function(e){return e.toUpperCase()}):n.tagName=n.tagName.toUpperCase();var r=Array.isArray(n.tagName)?n.tagName:[n.tagName];r.forEach(function(e){null!=d[e]&&null!=n.className||(d[e]=n)})}return n}var s=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(t){var n=this;return t="[Parchment] "+t,n=e.call(this,t)||this,n.message=t,n.name=n.constructor.name,n}return s(t,e),t}(Error);t.ParchmentError=l;var c={},u={},d={},p={};t.DATA_KEY="__blot";var f;!function(e){e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY"}(f=t.Scope||(t.Scope={})),t.create=r,t.find=i,t.query=o,t.register=a},function(e,t,n){var r=n(54),i=n(11),o=n(3),a=n(20),s=String.fromCharCode(0),l=function(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]};l.prototype.insert=function(e,t){var n={};return 0===e.length?this:(n.insert=e,null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))},l.prototype.delete=function(e){return e<=0?this:this.push({delete:e})},l.prototype.retain=function(e,t){if(e<=0)return this;var n={retain:e};return null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)},l.prototype.push=function(e){var t=this.ops.length,n=this.ops[t-1];if(e=o(!0,{},e),"object"==typeof n){if("number"==typeof e.delete&&"number"==typeof n.delete)return this.ops[t-1]={delete:n.delete+e.delete},this;if("number"==typeof n.delete&&null!=e.insert&&(t-=1,"object"!=typeof(n=this.ops[t-1])))return this.ops.unshift(e),this;if(i(e.attributes,n.attributes)){if("string"==typeof e.insert&&"string"==typeof n.insert)return this.ops[t-1]={insert:n.insert+e.insert},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this;if("number"==typeof e.retain&&"number"==typeof n.retain)return this.ops[t-1]={retain:n.retain+e.retain},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this},l.prototype.filter=function(e){return this.ops.filter(e)},l.prototype.forEach=function(e){this.ops.forEach(e)},l.prototype.map=function(e){return this.ops.map(e)},l.prototype.partition=function(e){var t=[],n=[];return this.forEach(function(r){(e(r)?t:n).push(r)}),[t,n]},l.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},l.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},l.prototype.length=function(){return this.reduce(function(e,t){return e+a.length(t)},0)},l.prototype.slice=function(e,t){e=e||0,"number"!=typeof t&&(t=1/0);for(var n=[],r=a.iterator(this.ops),i=0;i<t&&r.hasNext();){var o;i<e?o=r.next(e-i):(o=r.next(t-i),n.push(o)),i+=a.length(o)}return new l(n)},l.prototype.compose=function(e){for(var t=a.iterator(this.ops),n=a.iterator(e.ops),r=new l;t.hasNext()||n.hasNext();)if("insert"===n.peekType())r.push(n.next());else if("delete"===t.peekType())r.push(t.next());else{var i=Math.min(t.peekLength(),n.peekLength()),o=t.next(i),s=n.next(i);if("number"==typeof s.retain){var c={};"number"==typeof o.retain?c.retain=i:c.insert=o.insert;var u=a.attributes.compose(o.attributes,s.attributes,"number"==typeof o.retain);u&&(c.attributes=u),r.push(c)}else"number"==typeof s.delete&&"number"==typeof o.retain&&r.push(s)}return r.chop()},l.prototype.concat=function(e){var t=new l(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t},l.prototype.diff=function(e,t){if(this.ops===e.ops)return new l;var n=[this,e].map(function(t){return t.map(function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:s;var r=t===e?"on":"with";throw new Error("diff() called "+r+" non-document")}).join("")}),o=new l,c=r(n[0],n[1],t),u=a.iterator(this.ops),d=a.iterator(e.ops);return c.forEach(function(e){for(var t=e[1].length;t>0;){var n=0;switch(e[0]){case r.INSERT:n=Math.min(d.peekLength(),t),o.push(d.next(n));break;case r.DELETE:n=Math.min(t,u.peekLength()),u.next(n),o.delete(n);break;case r.EQUAL:n=Math.min(u.peekLength(),d.peekLength(),t);var s=u.next(n),l=d.next(n);i(s.insert,l.insert)?o.retain(n,a.attributes.diff(s.attributes,l.attributes)):o.push(l).delete(n)}t-=n}}),o.chop()},l.prototype.eachLine=function(e,t){t=t||"\n";for(var n=a.iterator(this.ops),r=new l,i=0;n.hasNext();){if("insert"!==n.peekType())return;var o=n.peek(),s=a.length(o)-n.peekLength(),c="string"==typeof o.insert?o.insert.indexOf(t,s)-s:-1;if(c<0)r.push(n.next());else if(c>0)r.push(n.next(c));else{if(!1===e(r,n.next(1).attributes||{},i))return;i+=1,r=new l}}r.length()>0&&e(r,{},i)},l.prototype.transform=function(e,t){if(t=!!t,"number"==typeof e)return this.transformPosition(e,t);for(var n=a.iterator(this.ops),r=a.iterator(e.ops),i=new l;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!t&&"insert"===r.peekType())if("insert"===r.peekType())i.push(r.next());else{var o=Math.min(n.peekLength(),r.peekLength()),s=n.next(o),c=r.next(o);if(s.delete)continue;c.delete?i.push(c):i.retain(o,a.attributes.transform(s.attributes,c.attributes,t))}else i.retain(a.length(n.next()));return i.chop()},l.prototype.transformPosition=function(e,t){t=!!t;for(var n=a.iterator(this.ops),r=0;n.hasNext()&&r<=e;){var i=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(r<e||!t)&&(e+=i),r+=i):e-=Math.min(i,e-r)}return e},e.exports=l},function(e,t){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},o=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t=n.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!t&&!i)return!1;var o;for(o in e);return void 0===o||n.call(e,o)};e.exports=function e(){var t,n,r,a,s,l,c=arguments[0],u=1,d=arguments.length,p=!1;for("boolean"==typeof c&&(p=c,c=arguments[1]||{},u=2),(null==c||"object"!=typeof c&&"function"!=typeof c)&&(c={});u<d;++u)if(null!=(t=arguments[u]))for(n in t)r=c[n],a=t[n],c!==a&&(p&&a&&(o(a)||(s=i(a)))?(s?(s=!1,l=r&&i(r)?r:[]):l=r&&o(r)?r:{},c[n]=e(p,l,a)):void 0!==a&&(c[n]=a));return c}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==e?t:("function"==typeof e.formats&&(t=(0,d.default)(t,e.formats())),null==e.parent||"scroll"==e.parent.blotName||e.parent.statics.scope!==e.statics.scope?t:s(e.parent,t))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BlockEmbed=t.bubbleFormats=void 0;var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},u=n(3),d=r(u),p=n(2),f=r(p),h=n(0),m=r(h),g=n(17),v=r(g),_=n(7),b=r(_),y=n(8),w=r(y),E=n(12),k=r(E),x=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),l(t,[{key:"attach",value:function(){c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"attach",this).call(this),this.attributes=new m.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new f.default).insert(this.value(),(0,d.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(e,t){var n=m.default.query(e,m.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,t)}},{key:"formatAt",value:function(e,t,n,r){this.format(n,r)}},{key:"insertAt",value:function(e,n,r){if("string"==typeof n&&n.endsWith("\n")){var i=m.default.create(S.blotName);this.parent.insertBefore(i,0===e?this:this.next),i.insertAt(0,n.slice(0,-1))}else c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r)}}]),t}(b.default);x.scope=m.default.Scope.BLOCK_BLOT;var S=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.cache={},n}return a(t,e),l(t,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(m.default.Leaf).reduce(function(e,t){return 0===t.length()?e:e.insert(t.value(),s(t))},new f.default).insert("\n",s(this))),this.cache.delta}},{key:"deleteAt",value:function(e,n){c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),this.cache={}}},{key:"formatAt",value:function(e,n,r,i){n<=0||(m.default.query(r,m.default.Scope.BLOCK)?e+n===this.length()&&this.format(r,i):c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,Math.min(n,this.length()-e-1),r,i),this.cache={})}},{key:"insertAt",value:function(e,n,r){if(null!=r)return c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r);if(0!==n.length){var i=n.split("\n"),o=i.shift();o.length>0&&(e<this.length()-1||null==this.children.tail?c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,Math.min(e,this.length()-1),o):this.children.tail.insertAt(this.children.tail.length(),o),this.cache={});var a=this;i.reduce(function(e,t){return a=a.split(e,!0),a.insertAt(0,t),t.length},e+o.length)}}},{key:"insertBefore",value:function(e,n){var r=this.children.head;c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n),r instanceof v.default&&r.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(e,n){c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"moveChildren",this).call(this,e,n),this.cache={}}},{key:"optimize",value:function(){c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this),this.cache={}}},{key:"path",value:function(e){return c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e,!0)}},{key:"removeChild",value:function(e){c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"removeChild",this).call(this,e),this.cache={}}},{key:"split",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===e||e>=this.length()-1)){var r=this.clone();return 0===e?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var i=c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"split",this).call(this,e,n);return this.cache={},i}}]),t}(m.default.Block);S.blotName="block",S.tagName="P",S.defaultChild="break",S.allowedChildren=[w.default,b.default,k.default],t.bubbleFormats=s,t.BlockEmbed=x,t.default=S},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(53),u=r(c),d=n(10),p=r(d),f=(0,p.default)("quill:events"),h=function(e){function t(){i(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.on("error",f.error),e}return a(t,e),s(t,[{key:"emit",value:function(){f.log.apply(f,arguments),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"emit",this).apply(this,arguments)}}]),t}(u.default);h.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},h.sources={API:"api",SILENT:"silent",USER:"user"},t.default=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(t=(0,C.default)(!0,{container:e,modules:{clipboard:!0,keyboard:!0,history:!0}},t),t.theme&&t.theme!==L.DEFAULTS.theme){if(t.theme=L.import("themes/"+t.theme),null==t.theme)throw new Error("Invalid theme "+t.theme+". Did you register it?")}else t.theme=T.default;var n=(0,C.default)(!0,{},t.theme.DEFAULTS);[n,t].forEach(function(e){e.modules=e.modules||{},Object.keys(e.modules).forEach(function(t){!0===e.modules[t]&&(e.modules[t]={})})});var r=Object.keys(n.modules).concat(Object.keys(t.modules)),i=r.reduce(function(e,t){var n=L.import("modules/"+t);return null==n?N.error("Cannot load "+t+" module. Are you sure you registered it?"):e[t]=n.DEFAULTS||{},e},{});return null!=t.modules&&t.modules.toolbar&&t.modules.toolbar.constructor!==Object&&(t.modules.toolbar={container:t.modules.toolbar}),t=(0,C.default)(!0,{},L.DEFAULTS,{modules:i},n,t),["bounds","container","scrollingContainer"].forEach(function(e){"string"==typeof t[e]&&(t[e]=document.querySelector(t[e]))}),t.modules=Object.keys(t.modules).reduce(function(e,n){return t.modules[n]&&(e[n]=t.modules[n]),e},{}),t}function s(e,t,n,r){if(this.options.strict&&!this.isEnabled()&&t===_.default.sources.USER)return new h.default;var i=null==n?null:this.getSelection(),o=this.editor.delta,a=e();if(null!=i&&(!0===n&&(n=i.index),null==r?i=c(i,a,t):0!==r&&(i=c(i,n,r,t)),this.setSelection(i,_.default.sources.SILENT)),a.length()>0){var s,l=[_.default.events.TEXT_CHANGE,a,o,t];if((s=this.emitter).emit.apply(s,[_.default.events.EDITOR_CHANGE].concat(l)),t!==_.default.sources.SILENT){var u;(u=this.emitter).emit.apply(u,l)}}return a}function l(e,t,n,r,i){var o={};return"number"==typeof e.index&&"number"==typeof e.length?"number"!=typeof t?(i=r,r=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):"number"!=typeof t&&(i=r,r=n,n=t,t=0),"object"===(void 0===n?"undefined":u(n))?(o=n,i=r):"string"==typeof n&&(null!=r?o[n]=r:i=n),i=i||_.default.sources.API,[e,t,o,i]}function c(e,t,n,r){if(null==e)return null;var i=void 0,o=void 0;if(t instanceof h.default){var a=[e.index,e.index+e.length].map(function(e){return t.transformPosition(e,r!==_.default.sources.USER)}),s=d(a,2);i=s[0],o=s[1]}else{var l=[e.index,e.index+e.length].map(function(e){return e<t||e===t&&r===_.default.sources.USER?e:n>=0?e+n:Math.max(t,e+n)}),c=d(l,2);i=c[0],o=c[1]}return new k.Range(i,o-i)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.overload=t.expandConfig=void 0;var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();n(44);var f=n(2),h=r(f),m=n(14),g=r(m),v=n(5),_=r(v),b=n(9),y=r(b),w=n(0),E=r(w),k=n(15),x=r(k),S=n(3),C=r(S),M=n(10),A=r(M),O=n(30),T=r(O),N=(0,A.default)("quill"),L=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(o(this,e),this.options=a(t,r),this.container=this.options.container,null==this.container)return N.error("Invalid Quill container",t);this.options.debug&&e.debug(this.options.debug);var i=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new _.default,this.scroll=E.default.create(this.root,{emitter:this.emitter,scrollingContainer:this.scrollingContainer,whitelist:this.options.formats}),this.editor=new g.default(this.scroll),this.selection=new x.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(_.default.events.EDITOR_CHANGE,function(e){e===_.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())}),this.emitter.on(_.default.events.SCROLL_UPDATE,function(e,t){var r=n.selection.lastRange,i=r&&0===r.length?r.index:void 0;s.call(n,function(){return n.editor.update(null,t,i)},e)});var l=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+i+"<p><br></p></div>");this.setContents(l),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return p(e,null,[{key:"debug",value:function(e){!0===e&&(e="log"),A.default.level(e)}},{key:"find",value:function(e){return e.__quill||E.default.find(e)}},{key:"import",value:function(e){return null==this.imports[e]&&N.error("Cannot import "+e+". Are you sure it was registered?"),this.imports[e]}},{key:"register",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof e){var i=e.attrName||e.blotName;"string"==typeof i?this.register("formats/"+i,e,t):Object.keys(e).forEach(function(r){n.register(r,e[r],t)})}else null==this.imports[e]||r||N.warn("Overwriting "+e+" with",t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&"abstract"!==t.blotName?E.default.register(t):e.startsWith("modules")&&"function"==typeof t.register&&t.register()}}]),p(e,[{key:"addContainer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e){var n=e;e=document.createElement("div"),e.classList.add(n)}return this.container.insertBefore(e,t),e}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(e,t,n){var r=this,i=l(e,t,n),o=d(i,4);return e=o[0],t=o[1],n=o[3],s.call(this,function(){return r.editor.deleteText(e,t)},n,e,-1*t)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}},{key:"focus",value:function(){var e=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=e,this.selection.scrollIntoView()}},{key:"format",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.default.sources.API;return s.call(this,function(){var r=n.getSelection(!0),o=new h.default;if(null==r)return o;if(E.default.query(e,E.default.Scope.BLOCK))o=n.editor.formatLine(r.index,r.length,i({},e,t));else{if(0===r.length)return n.selection.format(e,t),o;o=n.editor.formatText(r.index,r.length,i({},e,t))}return n.setSelection(r,_.default.sources.SILENT),o},r)}},{key:"formatLine",value:function(e,t,n,r,i){var o=this,a=void 0,c=l(e,t,n,r,i),u=d(c,4);return e=u[0],t=u[1],a=u[2],i=u[3],s.call(this,function(){return o.editor.formatLine(e,t,a)},i,e,0)}},{key:"formatText",value:function(e,t,n,r,i){var o=this,a=void 0,c=l(e,t,n,r,i),u=d(c,4);return e=u[0],t=u[1],a=u[2],i=u[3],s.call(this,function(){return o.editor.formatText(e,t,a)},i,e,0)}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof e?this.selection.getBounds(e,t):this.selection.getBounds(e.index,e.length);var r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}},{key:"getContents",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=l(e,t),r=d(n,2);return e=r[0],t=r[1],this.editor.getContents(e,t)}},{key:"getFormat",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof e?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}},{key:"getIndex",value:function(e){return e.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(e){return this.scroll.leaf(e)}},{key:"getLine",value:function(e){return this.scroll.line(e)}},{key:"getLines",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof e?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}},{key:"getModule",value:function(e){return this.theme.modules[e]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=l(e,t),r=d(n,2);return e=r[0],t=r[1],this.editor.getText(e,t)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.sources.API;return s.call(this,function(){return i.editor.insertEmbed(t,n,r)},o,t)}},{key:"insertText",value:function(e,t,n,r,i){var o=this,a=void 0,c=l(e,0,n,r,i),u=d(c,4);return e=u[0],a=u[2],i=u[3],s.call(this,function(){return o.editor.insertText(e,t,a)},i,e,t.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(e,t,n){this.clipboard.dangerouslyPasteHTML(e,t,n)}},{key:"removeFormat",value:function(e,t,n){var r=this,i=l(e,t,n),o=d(i,4);return e=o[0],t=o[1],n=o[3],s.call(this,function(){return r.editor.removeFormat(e,t)},n,e)}},{key:"setContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.default.sources.API;return s.call(this,function(){e=new h.default(e);var n=t.getLength(),r=t.editor.deleteText(0,n),i=t.editor.applyDelta(e),o=i.ops[i.ops.length-1];return null!=o&&"string"==typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(t.editor.deleteText(t.getLength()-1,1),i.delete(1)),r.compose(i)},n)}},{key:"setSelection",value:function(t,n,r){if(null==t)this.selection.setRange(null,n||e.sources.API);else{var i=l(t,n,r),o=d(i,4);t=o[0],n=o[1],r=o[3],this.selection.setRange(new k.Range(t,n),r)}r!==_.default.sources.SILENT&&this.selection.scrollIntoView()}},{key:"setText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.default.sources.API,n=(new h.default).insert(e);return this.setContents(n,t)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_.default.sources.USER,t=this.scroll.update(e);return this.selection.update(e),t}},{key:"updateContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.default.sources.API;return s.call(this,function(){return e=new h.default(e),t.editor.applyDelta(e,n)},n,!0)}}]),e}();L.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},L.events=_.default.events,L.sources=_.default.sources,L.version="1.2.6",L.imports={delta:h.default,parchment:E.default,"core/module":y.default,"core/theme":T.default},t.expandConfig=a,t.overload=l,t.default=L},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),l=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),t}(s.default.Embed);t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(7),u=r(c),d=n(12),p=r(d),f=n(0),h=r(f),m=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"formatAt",value:function(e,n,r,i){if(t.compare(this.statics.blotName,r)<0&&h.default.query(r,h.default.Scope.BLOT)){var o=this.isolate(e,n);i&&o.wrap(r,i)}else l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,i)}},{key:"optimize",value:function(){if(l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this),this.parent instanceof t&&t.compare(this.statics.blotName,this.parent.statics.blotName)>0){var e=this.parent.isolate(this.offset(),this.length());this.moveChildren(e),e.wrap(this)}}}],[{key:"compare",value:function(e,n){var r=t.order.indexOf(e),i=t.order.indexOf(n);return r>=0||i>=0?r-i:e===n?0:e<n?-1:1}}]),t}(h.default.Inline);m.allowedChildren=[m,u.default,p.default],m.order=["cursor","inline","code","underline","strike","italic","bold","script","link"],t.default=m},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,e),this.quill=t,this.options=n};i.DEFAULTS={},t.default=i},function(e,t,n){"use strict";function r(e){if(o.indexOf(e)<=o.indexOf(a)){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console[e].apply(console,n)}}function i(e){return o.reduce(function(t,n){return t[n]=r.bind(console,n,e),t},{})}Object.defineProperty(t,"__esModule",{value:!0});var o=["error","warn","log","info"],a="warn";r.level=i.level=function(e){a=e},t.default=i},function(e,t,n){function r(e){return null===e||void 0===e}function i(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length)&&("function"==typeof e.copy&&"function"==typeof e.slice&&!(e.length>0&&"number"!=typeof e[0]))}function o(e,t,n){var o,u;if(r(e)||r(t))return!1;if(e.prototype!==t.prototype)return!1;if(l(e))return!!l(t)&&(e=a.call(e),t=a.call(t),c(e,t,n));if(i(e)){if(!i(t))return!1;if(e.length!==t.length)return!1;for(o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}try{var d=s(e),p=s(t)}catch(e){return!1}if(d.length!=p.length)return!1;for(d.sort(),p.sort(),o=d.length-1;o>=0;o--)if(d[o]!=p[o])return!1;for(o=d.length-1;o>=0;o--)if(u=d[o],!c(e[u],t[u],n))return!1;return typeof e==typeof t}var a=Array.prototype.slice,s=n(52),l=n(51),c=e.exports=function(e,t,n){return n||(n={}),e===t||(e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:o(e,t,n))}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),s=function(e){return e&&e.__esModule?e:{default:e}}(a),l=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),t}(s.default.Text);t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(e,t,n){void 0===n&&(n={}),this.attrName=e,this.keyName=t;var i=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|i:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return e.keys=function(e){return[].map.call(e.attributes,function(e){return e.name})},e.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.setAttribute(this.keyName,t),!0)},e.prototype.canAdd=function(e,t){return null!=r.query(e,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||this.whitelist.indexOf(t)>-1)},e.prototype.remove=function(e){e.removeAttribute(this.keyName)},e.prototype.value=function(e){var t=e.getAttribute(this.keyName);return this.canAdd(e,t)?t:""},e}();t.default=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){return Object.keys(t).reduce(function(n,r){return null==e[r]?n:(t[r]===e[r]?n[r]=t[r]:Array.isArray(t[r])?t[r].indexOf(e[r])<0&&(n[r]=t[r].concat([e[r]])):n[r]=[t[r],e[r]],n)},{})}function s(e){return e.reduce(function(e,t){if(1===t.insert){var n=(0,x.default)(t.attributes);return delete n.image,e.insert({image:t.attributes.image},n)}if(null==t.attributes||!0!==t.attributes.list&&!0!==t.attributes.bullet||(t=(0,x.default)(t),t.attributes.list?t.attributes.list="ordered":(t.attributes.list="bullet",delete t.attributes.bullet)),"string"==typeof t.insert){var r=t.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return e.insert(r,t.attributes)}return e.push(t)},new p.default)}Object.defineProperty(t,"__esModule",{value:!0});var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(2),p=r(d),f=n(20),h=r(f),m=n(0),g=r(m),v=n(16),_=r(v),b=n(25),y=r(b),w=n(4),E=r(w),k=n(19),x=r(k),S=n(11),C=r(S),M=n(3),A=r(M),O=function(){function e(t){o(this,e),this.scroll=t,this.delta=this.getDelta()}return u(e,[{key:"applyDelta",value:function(e){var t=this,n=!1;this.scroll.update();var r=this.scroll.length();return this.scroll.batch=!0,e=s(e),e.reduce(function(e,i){var o=i.retain||i.delete||i.insert.length||1,a=i.attributes||{};if(null!=i.insert){if("string"==typeof i.insert){var s=i.insert;s.endsWith("\n")&&n&&(n=!1,s=s.slice(0,-1)),e>=r&&!s.endsWith("\n")&&(n=!0),t.scroll.insertAt(e,s);var u=t.scroll.line(e),d=c(u,2),p=d[0],f=d[1],m=(0,A.default)({},(0,w.bubbleFormats)(p));if(p instanceof E.default){var v=p.descendant(g.default.Leaf,f),_=c(v,1),b=_[0];m=(0,A.default)(m,(0,w.bubbleFormats)(b))}a=h.default.attributes.diff(m,a)||{}}else if("object"===l(i.insert)){var y=Object.keys(i.insert)[0];if(null==y)return e;t.scroll.insertAt(e,y,i.insert[y])}r+=o}return Object.keys(a).forEach(function(n){t.scroll.formatAt(e,o,n,a[n])}),e+o},0),e.reduce(function(e,n){return"number"==typeof n.delete?(t.scroll.deleteAt(e,n.delete),e):e+(n.retain||n.insert.length||1)},0),this.scroll.batch=!1,this.scroll.optimize(),this.update(e)}},{key:"deleteText",value:function(e,t){return this.scroll.deleteAt(e,t),this.update((new p.default).retain(e).delete(t))}},{key:"formatLine",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach(function(i){if(null==n.scroll.whitelist||n.scroll.whitelist[i]){var o=n.scroll.lines(e,Math.max(t,1)),a=t;o.forEach(function(t){var o=t.length();if(t instanceof _.default){var s=e-t.offset(n.scroll),l=t.newlineIndex(s+a)-s+1;t.formatAt(s,l,i,r[i])}else t.format(i,r[i]);a-=o})}}),this.scroll.optimize(),this.update((new p.default).retain(e).retain(t,(0,x.default)(r)))}},{key:"formatText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach(function(i){n.scroll.formatAt(e,t,i,r[i])}),this.update((new p.default).retain(e).retain(t,(0,x.default)(r)))}},{key:"getContents",value:function(e,t){return this.delta.slice(e,e+t)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(e,t){return e.concat(t.delta())},new p.default)}},{key:"getFormat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===t?this.scroll.path(e).forEach(function(e){var t=c(e,1),i=t[0];i instanceof E.default?n.push(i):i instanceof g.default.Leaf&&r.push(i)}):(n=this.scroll.lines(e,t),r=this.scroll.descendants(g.default.Leaf,e,t));var i=[n,r].map(function(e){if(0===e.length)return{};for(var t=(0,w.bubbleFormats)(e.shift());Object.keys(t).length>0;){var n=e.shift();if(null==n)return t;t=a((0,w.bubbleFormats)(n),t)}return t});return A.default.apply(A.default,i)}},{key:"getText",value:function(e,t){return this.getContents(e,t).filter(function(e){return"string"==typeof e.insert}).map(function(e){return e.insert}).join("")}},{key:"insertEmbed",value:function(e,t,n){return this.scroll.insertAt(e,t,n),this.update((new p.default).retain(e).insert(i({},t,n)))}},{key:"insertText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(e,t),Object.keys(r).forEach(function(i){n.scroll.formatAt(e,t.length,i,r[i])}),this.update((new p.default).retain(e).insert(t,(0,x.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var e=this.scroll.children.head;return e.length()<=1&&0==Object.keys(e.formats()).length}},{key:"removeFormat",value:function(e,t){var n=this.getText(e,t),r=this.scroll.line(e+t),i=c(r,2),o=i[0],a=i[1],s=0,l=new p.default;null!=o&&(s=o instanceof _.default?o.newlineIndex(a)-a+1:o.length()-a,l=o.delta().slice(a,a+s-1).insert("\n"));var u=this.getContents(e,t+s),d=u.diff((new p.default).insert(n).concat(l)),f=(new p.default).retain(e).concat(d);return this.applyDelta(f)}},{key:"update",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===t.length&&"characterData"===t[0].type&&t[0].target.data.match(/^[ -~]*$/)&&g.default.find(t[0].target)){var i=g.default.find(t[0].target),o=(0,w.bubbleFormats)(i),a=i.offset(this.scroll),s=t[0].oldValue.replace(y.default.CONTENTS,""),l=(new p.default).insert(s),c=(new p.default).insert(i.value());e=(new p.default).retain(a).concat(l.diff(c,n)).reduce(function(e,t){return t.insert?e.insert(t.insert,o):e.push(t)},new p.default),this.delta=r.compose(e)}else this.delta=this.getDelta(),e&&(0,C.default)(r.compose(e),this.delta)||(e=r.diff(this.delta,n));return e}}]),e}();t.default=O},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){try{t.parentNode}catch(e){return!1}return t instanceof Text&&(t=t.parentNode),e.contains(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Range=void 0;var s=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),u=r(c),d=n(19),p=r(d),f=n(11),h=r(f),m=n(5),g=r(m),v=n(10),_=r(v),b=(0,_.default)("quill:selection"),y=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;o(this,e),this.index=t,this.length=n},w=function(){function e(t,n){var r=this;o(this,e),this.emitter=n,this.scroll=t,this.composing=!1,this.root=this.scroll.domNode,this.root.addEventListener("compositionstart",function(){r.composing=!0}),this.root.addEventListener("compositionend",function(){r.composing=!1}),this.cursor=u.default.create("cursor",this),this.lastRange=this.savedRange=new y(0,0),["keyup","mouseup","mouseleave","touchend","touchleave","focus","blur"].forEach(function(e){r.root.addEventListener(e,function(){setTimeout(r.update.bind(r,g.default.sources.USER),100)})}),this.emitter.on(g.default.events.EDITOR_CHANGE,function(e,t){e===g.default.events.TEXT_CHANGE&&t.length()>0&&r.update(g.default.sources.SILENT)}),this.emitter.on(g.default.events.SCROLL_BEFORE_UPDATE,function(){if(r.hasFocus()){var e=r.getNativeRange();null!=e&&e.start.node!==r.cursor.textNode&&r.emitter.once(g.default.events.SCROLL_UPDATE,function(){try{r.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset)}catch(e){}})}}),this.update(g.default.sources.SILENT)}return l(e,[{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(e,t){if(null==this.scroll.whitelist||this.scroll.whitelist[e]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!u.default.query(e,u.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=u.default.find(n.start.node,!1);if(null==r)return;if(r instanceof u.default.Leaf){var i=r.split(n.start.offset);r.parent.insertBefore(this.cursor,i)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();e=Math.min(e,n-1),t=Math.min(e+t,n-1)-e;var r=void 0,i=this.scroll.leaf(e),o=s(i,2),a=o[0],l=o[1];if(null==a)return null;var c=a.position(l,!0),u=s(c,2);r=u[0],l=u[1];var d=document.createRange();if(t>0){d.setStart(r,l);var p=this.scroll.leaf(e+t),f=s(p,2);if(a=f[0],l=f[1],null==a)return null;var h=a.position(l,!0),m=s(h,2);return r=m[0],l=m[1],d.setEnd(r,l),d.getBoundingClientRect()}var g="left",v=void 0;return r instanceof Text?(l<r.data.length?(d.setStart(r,l),d.setEnd(r,l+1)):(d.setStart(r,l-1),d.setEnd(r,l),g="right"),v=d.getBoundingClientRect()):(v=a.domNode.getBoundingClientRect(),l>0&&(g="right")),{bottom:v.top+v.height,height:v.height,left:v[g],right:v[g],top:v.top,width:0}}},{key:"getNativeRange",value:function(){var e=document.getSelection();if(null==e||e.rangeCount<=0)return null;var t=e.getRangeAt(0);if(null==t)return null;var n=this.normalizeNative(t);return b.info("getNativeRange",n),n}},{key:"getRange",value:function(){var e=this.getNativeRange();return null==e?[null,null]:[this.normalizedToRange(e),e]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(e){var t=this,n=[[e.start.node,e.start.offset]];e.native.collapsed||n.push([e.end.node,e.end.offset]);var r=n.map(function(e){var n=s(e,2),r=n[0],i=n[1],o=u.default.find(r,!0),a=o.offset(t.scroll);return 0===i?a:o instanceof u.default.Container?a+o.length():a+o.index(r,i)}),o=Math.min(Math.max.apply(Math,i(r)),this.scroll.length()-1),a=Math.min.apply(Math,[o].concat(i(r)));return new y(a,o-a)}},{key:"normalizeNative",value:function(e){if(!a(this.root,e.startContainer)||!e.collapsed&&!a(this.root,e.endContainer))return null;var t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach(function(e){for(var t=e.node,n=e.offset;!(t instanceof Text)&&t.childNodes.length>0;)if(t.childNodes.length>n)t=t.childNodes[n],n=0;else{if(t.childNodes.length!==n)break;t=t.lastChild,n=t instanceof Text?t.data.length:t.childNodes.length+1}e.node=t,e.offset=n}),t}},{key:"rangeToNative",value:function(e){var t=this,n=e.collapsed?[e.index]:[e.index,e.index+e.length],r=[],i=this.scroll.length();return n.forEach(function(e,n){e=Math.min(i-1,e);var o=void 0,a=t.scroll.leaf(e),l=s(a,2),c=l[0],u=l[1],d=c.position(u,0!==n),p=s(d,2);o=p[0],u=p[1],r.push(o,u)}),r.length<2&&(r=r.concat(r)),r}},{key:"scrollIntoView",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.lastRange;if(null!=e){var t=this.getBounds(e.index,e.length);if(null!=t){var n=this.scroll.length()-1,r=this.scroll.line(Math.min(e.index,n)),i=s(r,1),o=i[0],a=o;if(e.length>0){var l=this.scroll.line(Math.min(e.index+e.length,n));a=s(l,1)[0]}if(null!=o&&null!=a){var c=this.scroll.scrollingContainer,u=c.getBoundingClientRect();t.top<u.top?c.scrollTop-=u.top-t.top:t.bottom>u.bottom&&(c.scrollTop+=t.bottom-u.bottom)}}}}},{key:"setNativeRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(b.info("setNativeRange",e,t,n,r),null==e||null!=this.root.parentNode&&null!=e.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o)if(null!=e){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||i||e!==a.startContainer||t!==a.startOffset||n!==a.endContainer||r!==a.endOffset){"BR"==e.tagName&&(t=[].indexOf.call(e.parentNode.childNodes,e),e=e.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var s=document.createRange();s.setStart(e,t),s.setEnd(n,r),o.removeAllRanges(),o.addRange(s)}}else o.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g.default.sources.API;if("string"==typeof t&&(n=t,t=!1),b.info("setRange",e),null!=e){var r=this.rangeToNative(e);this.setNativeRange.apply(this,i(r).concat([t]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.default.sources.USER,t=this.lastRange,n=this.getRange(),r=s(n,2),i=r[0],o=r[1];if(this.lastRange=i,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,h.default)(t,this.lastRange)){var a;!this.composing&&null!=o&&o.native.collapsed&&o.start.node!==this.cursor.textNode&&this.cursor.restore();var l=[g.default.events.SELECTION_CHANGE,(0,p.default)(this.lastRange),(0,p.default)(t),e];if((a=this.emitter).emit.apply(a,[g.default.events.EDITOR_CHANGE].concat(l)),e!==g.default.sources.SILENT){var c;(c=this.emitter).emit.apply(c,l)}}}}]),e}();t.Range=y,t.default=w},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Code=void 0;var s=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},u=n(2),d=r(u),p=n(0),f=r(p),h=n(4),m=r(h),g=n(8),v=r(g),_=n(12),b=r(_),y=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),t}(v.default);y.blotName="code",y.tagName="CODE";var w=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),l(t,[{key:"delta",value:function(){var e=this,t=this.domNode.textContent;return t.endsWith("\n")&&(t=t.slice(0,-1)),t.split("\n").reduce(function(t,n){return t.insert(n).insert("\n",e.formats())},new d.default)}},{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n){var r=this.descendant(b.default,this.length()-1),i=s(r,1),o=i[0];null!=o&&o.deleteAt(o.length()-1,1),c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}},{key:"formatAt",value:function(e,n,r,i){if(0!==n&&null!=f.default.query(r,f.default.Scope.BLOCK)&&(r!==this.statics.blotName||i!==this.statics.formats(this.domNode))){var o=this.newlineIndex(e);if(!(o<0||o>=e+n)){var a=this.newlineIndex(e,!0)+1,s=o-a+1,l=this.isolate(a,s),c=l.next;l.format(r,i),c instanceof t&&c.formatAt(0,e-a+n-s,r,i)}}}},{key:"insertAt",value:function(e,t,n){if(null==n){var r=this.descendant(b.default,e),i=s(r,2),o=i[0],a=i[1];o.insertAt(a,t)}}},{key:"length",value:function(){var e=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?e:e+1}},{key:"newlineIndex",value:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,e).lastIndexOf("\n");var t=this.domNode.textContent.slice(e).indexOf("\n");return t>-1?e+t:-1}},{key:"optimize",value:function(){this.domNode.textContent.endsWith("\n")||this.appendChild(f.default.create("text","\n")),c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this);var e=this.next;null!=e&&e.prev===this&&e.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===e.statics.formats(e.domNode)&&(e.optimize(),e.moveChildren(this),e.remove())}},{key:"replace",value:function(e){c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(e){var t=f.default.find(e);null==t?e.parentNode.removeChild(e):t instanceof f.default.Embed?t.remove():t.unwrap()})}}],[{key:"create",value:function(e){var n=c(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),t}(m.default);w.blotName="code-block",w.tagName="PRE",w.TAB="  ",t.Code=y,t.default=w},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},l=n(7),c=function(e){return e&&e.__esModule?e:{default:e}}(l),u=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),a(t,[{key:"insertInto",value:function(e,n){0===e.children.length?s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertInto",this).call(this,e,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),t}(c.default);u.blotName="break",u.tagName="BR",t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return e instanceof g.default||e instanceof m.BlockEmbed}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},d=n(0),p=r(d),f=n(5),h=r(f),m=n(4),g=r(m),v=n(17),_=r(v),b=n(24),y=r(b),w=n(16),E=r(w),k=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.emitter=n.emitter,r.scrollingContainer=n.scrollingContainer,Array.isArray(n.whitelist)&&(r.whitelist=n.whitelist.reduce(function(e,t){return e[t]=!0,e},{})),r.domNode.addEventListener("DOMNodeInserted",function(){}),r.optimize(),r.enable(),r}return a(t,e),c(t,[{key:"deleteAt",value:function(e,n){var r=this.line(e),i=l(r,2),o=i[0],a=i[1],s=this.line(e+n),c=l(s,1),d=c[0];if(u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),null!=d&&o!==d&&a>0&&!(o instanceof m.BlockEmbed)&&!(d instanceof m.BlockEmbed)){d instanceof E.default&&d.deleteAt(d.length()-1,1);var p=d.children.head instanceof _.default?null:d.children.head;o.moveChildren(d,p),o.remove()}this.optimize()}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",e)}},{key:"formatAt",value:function(e,n,r,i){(null==this.whitelist||this.whitelist[r])&&(u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,i),this.optimize())}},{key:"insertAt",value:function(e,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(e>=this.length())if(null==r||null==p.default.query(n,p.default.Scope.BLOCK)){var i=p.default.create(this.statics.defaultChild);this.appendChild(i),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),i.insertAt(0,n,r)}else{var o=p.default.create(n,r);this.appendChild(o)}else u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r);this.optimize()}}},{key:"insertBefore",value:function(e,n){if(e.statics.scope===p.default.Scope.INLINE_BLOT){var r=p.default.create(this.statics.defaultChild);r.appendChild(e),e=r}u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n)}},{key:"leaf",value:function(e){return this.path(e).pop()||[null,-1]}},{key:"line",value:function(e){return e===this.length()?this.line(e-1):this.descendant(s,e)}},{key:"lines",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return function e(t,n,r){var i=[],o=r;return t.children.forEachAt(n,r,function(t,n,r){s(t)?i.push(t):t instanceof p.default.Container&&(i=i.concat(e(t,n,o))),o-=r}),i}(this,e,t)}},{key:"optimize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];!0!==this.batch&&(u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),e.length>0&&this.emitter.emit(h.default.events.SCROLL_OPTIMIZE,e))}},{key:"path",value:function(e){return u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e).slice(1)}},{key:"update",value:function(e){if(!0!==this.batch){var n=h.default.sources.USER;"string"==typeof e&&(n=e),Array.isArray(e)||(e=this.observer.takeRecords()),e.length>0&&this.emitter.emit(h.default.events.SCROLL_BEFORE_UPDATE,n,e),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"update",this).call(this,e.concat([])),e.length>0&&this.emitter.emit(h.default.events.SCROLL_UPDATE,n,e)}}}]),t}(p.default.Scroll);k.blotName="scroll",k.className="ql-editor",k.tagName="DIV",k.defaultChild="block",k.allowedChildren=[g.default,m.BlockEmbed,y.default],t.default=k},function(e,n){var r=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}function n(r,i,o,a,d){function p(r,o){if(null===r)return null;if(0===o)return r;var g,v;if("object"!=typeof r)return r;if(e(r,l))g=new l;else if(e(r,c))g=new c;else if(e(r,u))g=new u(function(e,t){r.then(function(t){e(p(t,o-1))},function(e){t(p(e,o-1))})});else if(n.__isArray(r))g=[];else if(n.__isRegExp(r))g=new RegExp(r.source,s(r)),r.lastIndex&&(g.lastIndex=r.lastIndex);else if(n.__isDate(r))g=new Date(r.getTime());else{if(m&&t.isBuffer(r))return g=new t(r.length),r.copy(g),g;e(r,Error)?g=Object.create(r):void 0===a?(v=Object.getPrototypeOf(r),g=Object.create(v)):(g=Object.create(a),v=a)}if(i){var _=f.indexOf(r);if(-1!=_)return h[_];f.push(r),h.push(g)}e(r,l)&&r.forEach(function(e,t){var n=p(t,o-1),r=p(e,o-1);g.set(n,r)}),e(r,c)&&r.forEach(function(e){var t=p(e,o-1);g.add(t)});for(var b in r){var y;v&&(y=Object.getOwnPropertyDescriptor(v,b)),y&&null==y.set||(g[b]=p(r[b],o-1))}if(Object.getOwnPropertySymbols)for(var w=Object.getOwnPropertySymbols(r),b=0;b<w.length;b++){var E=w[b],k=Object.getOwnPropertyDescriptor(r,E);(!k||k.enumerable||d)&&(g[E]=p(r[E],o-1),k.enumerable||Object.defineProperty(g,E,{enumerable:!1}))}if(d)for(var x=Object.getOwnPropertyNames(r),b=0;b<x.length;b++){var S=x[b],k=Object.getOwnPropertyDescriptor(r,S);k&&k.enumerable||(g[S]=p(r[S],o-1),Object.defineProperty(g,S,{enumerable:!1}))}return g}"object"==typeof i&&(o=i.depth,a=i.prototype,d=i.includeNonEnumerable,i=i.circular);var f=[],h=[],m=void 0!==t;return void 0===i&&(i=!0),void 0===o&&(o=1/0),p(r,o)}function r(e){return Object.prototype.toString.call(e)}function i(e){return"object"==typeof e&&"[object Date]"===r(e)}function o(e){return"object"==typeof e&&"[object Array]"===r(e)}function a(e){return"object"==typeof e&&"[object RegExp]"===r(e)}function s(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}var l;try{l=Map}catch(e){l=function(){}}var c;try{c=Set}catch(e){c=function(){}}var u;try{u=Promise}catch(e){u=function(){}}return n.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},n.__objToStr=r,n.__isDate=i,n.__isArray=o,n.__isRegExp=a,n.__getRegExpFlags=s,n}();"object"==typeof e&&e.exports&&(e.exports=r)},function(e,t,n){function r(e){this.ops=e,this.index=0,this.offset=0}var i=n(11),o=n(3),a={attributes:{compose:function(e,t,n){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var r=o(!0,{},t);n||(r=Object.keys(r).reduce(function(e,t){return null!=r[t]&&(e[t]=r[t]),e},{}));for(var i in e)void 0!==e[i]&&void 0===t[i]&&(r[i]=e[i]);return Object.keys(r).length>0?r:void 0},diff:function(e,t){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var n=Object.keys(e).concat(Object.keys(t)).reduce(function(n,r){return i(e[r],t[r])||(n[r]=void 0===t[r]?null:t[r]),n},{});return Object.keys(n).length>0?n:void 0},transform:function(e,t,n){if("object"!=typeof e)return t;if("object"==typeof t){if(!n)return t;var r=Object.keys(t).reduce(function(n,r){return void 0===e[r]&&(n[r]=t[r]),n},{});return Object.keys(r).length>0?r:void 0}}},iterator:function(e){return new r(e)},length:function(e){return"number"==typeof e.delete?e.delete:"number"==typeof e.retain?e.retain:"string"==typeof e.insert?e.insert.length:1}};r.prototype.hasNext=function(){return this.peekLength()<1/0},r.prototype.next=function(e){e||(e=1/0);var t=this.ops[this.index];if(t){var n=this.offset,r=a.length(t);if(e>=r-n?(e=r-n,this.index+=1,this.offset=0):this.offset+=e,"number"==typeof t.delete)return{delete:e};var i={};return t.attributes&&(i.attributes=t.attributes),"number"==typeof t.retain?i.retain=e:"string"==typeof t.insert?i.insert=t.insert.substr(n,e):i.insert=t.insert,i}return{retain:1/0}},r.prototype.peek=function(){return this.ops[this.index]},r.prototype.peekLength=function(){return this.ops[this.index]?a.length(this.ops[this.index])-this.offset:1/0},r.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},e.exports=a},function(e,t,n){"use strict";function r(e){var t=s.find(e);if(null==t)try{t=s.create(e)}catch(n){t=s.create(s.Scope.INLINE),[].slice.call(e.childNodes).forEach(function(e){t.domNode.appendChild(e)}),e.parentNode.replaceChild(t.domNode,e),t.attach()}return t}var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(61),a=n(35),s=n(1),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.appendChild=function(e){this.insertBefore(e)},t.prototype.attach=function(){var t=this;e.prototype.attach.call(this),this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(e){try{var n=r(e);t.insertBefore(n,t.children.head)}catch(e){if(e instanceof s.ParchmentError)return;throw e}})},t.prototype.deleteAt=function(e,t){if(0===e&&t===this.length())return this.remove();this.children.forEachAt(e,t,function(e,t,n){e.deleteAt(t,n)})},t.prototype.descendant=function(e,n){var r=this.children.find(n),i=r[0],o=r[1];return null==e.blotName&&e(i)||null!=e.blotName&&i instanceof e?[i,o]:i instanceof t?i.descendant(e,o):[null,-1]},t.prototype.descendants=function(e,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var i=[],o=r;return this.children.forEachAt(n,r,function(n,r,a){(null==e.blotName&&e(n)||null!=e.blotName&&n instanceof e)&&i.push(n),n instanceof t&&(i=i.concat(n.descendants(e,r,o))),o-=a}),i},t.prototype.detach=function(){this.children.forEach(function(e){e.detach()}),e.prototype.detach.call(this)},t.prototype.formatAt=function(e,t,n,r){this.children.forEachAt(e,t,function(e,t,i){e.formatAt(t,i,n,r)})},t.prototype.insertAt=function(e,t,n){var r=this.children.find(e),i=r[0],o=r[1];if(i)i.insertAt(o,t,n);else{var a=null==n?s.create("text",t):s.create(t,n);this.appendChild(a)}},t.prototype.insertBefore=function(e,t){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some(function(t){return e instanceof t}))throw new s.ParchmentError("Cannot insert "+e.statics.blotName+" into "+this.statics.blotName);e.insertInto(this,t)},t.prototype.length=function(){return this.children.reduce(function(e,t){return e+t.length()},0)},t.prototype.moveChildren=function(e,t){this.children.forEach(function(n){e.insertBefore(n,t)})},t.prototype.optimize=function(){if(e.prototype.optimize.call(this),0===this.children.length)if(null!=this.statics.defaultChild){var t=s.create(this.statics.defaultChild);this.appendChild(t),t.optimize()}else this.remove()},t.prototype.path=function(e,n){void 0===n&&(n=!1);var r=this.children.find(e,n),i=r[0],o=r[1],a=[[this,e]];return i instanceof t?a.concat(i.path(o,n)):(null!=i&&a.push([i,o]),a)},t.prototype.removeChild=function(e){this.children.remove(e)},t.prototype.replace=function(n){n instanceof t&&n.moveChildren(this),e.prototype.replace.call(this,n)},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(e,this.length(),function(e,r,i){e=e.split(r,t),n.appendChild(e)}),n},t.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},t.prototype.update=function(e){var t=this,n=[],i=[];e.forEach(function(e){e.target===t.domNode&&"childList"===e.type&&(n.push.apply(n,e.addedNodes),i.push.apply(i,e.removedNodes))}),i.forEach(function(e){if(!(null!=e.parentNode&&"IFRAME"!==e.tagName&&document.body.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var n=s.find(e);null!=n&&(null!=n.domNode.parentNode&&n.domNode.parentNode!==t.domNode||n.detach())}}),n.filter(function(e){return e.parentNode==t.domNode}).sort(function(e,t){return e===t?0:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(e){var n=null;null!=e.nextSibling&&(n=s.find(e.nextSibling));var i=r(e);i.next==n&&null!=i.next||(null!=i.parent&&i.parent.removeChild(t),t.insertBefore(i,n))})},t}(a.default);t.default=l},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(13),o=n(33),a=n(21),s=n(1),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(e){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?e.tagName.toLowerCase():void 0)},t.prototype.attach=function(){e.prototype.attach.call(this),this.attributes=new o.default(this.domNode)},t.prototype.format=function(e,t){var n=s.query(e);n instanceof i.default?this.attributes.attribute(n,t):t&&(null==n||e===this.statics.blotName&&this.formats()[e]===t||this.replaceWith(e,t))},t.prototype.formats=function(){var e=this.attributes.values(),t=this.statics.formats(this.domNode);return null!=t&&(e[this.statics.blotName]=t),e},t.prototype.replaceWith=function(t,n){var r=e.prototype.replaceWith.call(this,t,n);return this.attributes.copy(r),r},t.prototype.update=function(t){var n=this;e.prototype.update.call(this,t),t.some(function(e){return e.target===n.domNode&&"attributes"===e.type})&&this.attributes.build()},t.prototype.wrap=function(n,r){var i=e.prototype.wrap.call(this,n,r);return i instanceof t&&i.statics.scope===this.statics.scope&&this.attributes.move(i),i},t}(a.default);t.default=l},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(35),o=n(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.value=function(e){return!0},t.prototype.index=function(e,t){return e!==this.domNode?-1:Math.min(t,1)},t.prototype.position=function(e,t){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]},t.prototype.value=function(){return e={},e[this.statics.blotName]=this.statics.value(this.domNode)||!0,e;var e},t}(i.default);a.scope=o.Scope.INLINE_BLOT,t.default=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=r(s),c=n(4),u=r(c),d=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),t}(l.default.Container);d.allowedChildren=[u.default,c.BlockEmbed,d],t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),d=r(u),p=n(7),f=r(p),h=n(12),m=r(h),g=n(5),v=r(g),_=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.selection=n,r.textNode=document.createTextNode(t.CONTENTS),r.domNode.appendChild(r.textNode),r._length=0,r}return a(t,e),c(t,null,[{key:"value",value:function(){}}]),c(t,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(e,n){if(0!==this._length)return l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);for(var r=this,i=0;null!=r&&r.statics.scope!==d.default.Scope.BLOCK_BLOT;)i+=r.offset(r.parent),r=r.parent;null!=r&&(this._length=t.CONTENTS.length,r.optimize(),r.formatAt(i,t.CONTENTS.length,e,n),this._length=0)}},{key:"index",value:function(e,n){return e===this.textNode?0:l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){var e=this;if(!this.selection.composing&&null!=this.parent){var n=this.textNode,r=this.selection.getNativeRange(),i=void 0,o=void 0,a=void 0;if(null!=r&&r.start.node===n&&r.end.node===n){var l=[n,r.start.offset,r.end.offset];i=l[0],o=l[1],a=l[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==t.CONTENTS){var c=this.textNode.data.split(t.CONTENTS).join("");this.next instanceof m.default?(i=this.next.domNode,this.next.insertAt(0,c),this.textNode.data=t.CONTENTS):(this.textNode.data=c,this.parent.insertBefore(d.default.create(this.textNode),this),this.textNode=document.createTextNode(t.CONTENTS),this.domNode.appendChild(this.textNode))}this.remove(),null!=o&&this.selection.emitter.once(v.default.events.SCROLL_OPTIMIZE,function(){var t=[o,a].map(function(e){return Math.max(0,Math.min(i.data.length,e-1))}),n=s(t,2);o=n[0],a=n[1],e.selection.setNativeRange(i,o,i,a)})}}},{key:"update",value:function(e){var t=this;e.forEach(function(e){"characterData"===e.type&&e.target===t.textNode&&t.restore()})}},{key:"value",value:function(){return""}}]),t}(f.default);_.blotName="cursor",_.className="ql-cursor",_.tagName="span",_.CONTENTS="\ufeff",t.default=_},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.ColorStyle=t.ColorClass=t.ColorAttributor=void 0;var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},l=n(0),c=function(e){return e&&e.__esModule?e:{default:e}}(l),u=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),a(t,[{key:"value",value:function(e){var n=s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e);return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+n.split(",").map(function(e){return("00"+parseInt(e).toString(16)).slice(-2)}).join("")):n}}]),t}(c.default.Attributor.Style),d=new c.default.Attributor.Class("color","ql-color",{scope:c.default.Scope.INLINE}),p=new u("color","color",{scope:c.default.Scope.INLINE});t.ColorAttributor=u,t.ColorClass=d,t.ColorStyle=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){var n=document.createElement("a");n.href=e;var r=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(r)>-1}Object.defineProperty(t,"__esModule",{value:!0}),t.sanitize=t.default=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(8),u=function(e){return e&&e.__esModule?e:{default:e}}(c),d=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,[{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n)return l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(e){var n=l(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return e=this.sanitize(e),n.setAttribute("href",e),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(e){return e.getAttribute("href")}},{key:"sanitize",value:function(e){return a(e,["http","https","mailto"])?e:this.SANITIZED_URL}}]),t}(u.default);d.blotName="link",d.tagName="A",d.SANITIZED_URL="about:blank",t.default=d,t.sanitize=a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(88),s=function(e){return e&&e.__esModule?e:{default:e}}(a),l=function(){function e(t){var n=this;r(this,e),this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){n.container.classList.toggle("ql-expanded")}),this.select.addEventListener("change",this.update.bind(this))}return o(e,[{key:"buildItem",value:function(e){var t=this,n=document.createElement("span");return n.classList.add("ql-picker-item"),e.hasAttribute("value")&&n.setAttribute("data-value",e.getAttribute("value")),e.textContent&&n.setAttribute("data-label",e.textContent),n.addEventListener("click",function(){t.selectItem(n,!0)}),n}},{key:"buildLabel",value:function(){var e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=s.default,this.container.appendChild(e),e}},{key:"buildOptions",value:function(){var e=this,t=document.createElement("span");t.classList.add("ql-picker-options"),[].slice.call(this.select.options).forEach(function(n){var r=e.buildItem(n);t.appendChild(r),n.hasAttribute("selected")&&e.selectItem(r)}),this.container.appendChild(t)}},{key:"buildPicker",value:function(){var e=this;[].slice.call(this.select.attributes).forEach(function(t){e.container.setAttribute(t.name,t.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"close",value:function(){this.container.classList.remove("ql-expanded")}},{key:"selectItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(e!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=e&&(e.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(e.parentNode.children,e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":i(Event))){var r=document.createEvent("Event");r.initEvent("change",!0,!0),this.select.dispatchEvent(r)}this.close()}}},{key:"update",value:function(){var e=void 0;if(this.select.selectedIndex>-1){var t=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(t)}else this.selectItem(null);var n=null!=e&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),e}();t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(0),o=r(i),a=n(6),s=r(a),l=n(4),c=r(l),u=n(17),d=r(u),p=n(24),f=r(p),h=n(25),m=r(h),g=n(7),v=r(g),_=n(8),b=r(_),y=n(18),w=r(y),E=n(12),k=r(E),x=n(46),S=r(x),C=n(42),M=r(C),A=n(31),O=r(A);s.default.register({"blots/block":c.default,"blots/block/embed":l.BlockEmbed,"blots/break":d.default,"blots/container":f.default,"blots/cursor":m.default,"blots/embed":v.default,"blots/inline":b.default,"blots/scroll":w.default,"blots/text":k.default,"modules/clipboard":S.default,"modules/history":M.default,"modules/keyboard":O.default}),o.default.register(c.default,d.default,m.default,b.default,w.default,k.default),e.exports=s.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t,n){r(this,e),this.quill=t,this.options=n,this.modules={}}return i(e,[{key:"init",value:function(){var e=this;Object.keys(this.options.modules).forEach(function(t){null==e.modules[t]&&e.addModule(t)})}},{key:"addModule",value:function(e){var t=this.quill.constructor.import("modules/"+e);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}}]),e}();o.DEFAULTS={modules:{}},o.themes={default:o},t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t){if(!(0===e.index||this.quill.getLength()<=1)){var n=this.quill.getLine(e.index),r=m(n,1),i=r[0],o={};if(0===t.offset){var a=this.quill.getLine(e.index-1),s=m(a,1),l=s[0];if(null!=l&&l.length()>1){var c=i.formats(),u=this.quill.getFormat(e.index-1,1);o=x.default.attributes.diff(c,u)||{}}}var d=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;this.quill.deleteText(e.index-d,d,A.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(e.index-d,d,o,A.default.sources.USER),this.quill.selection.scrollIntoView()}}function l(e,t){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(!(e.index>=this.quill.getLength()-n)){var r={},i=0,o=this.quill.getLine(e.index),a=m(o,1),s=a[0];if(t.offset>=s.length()-1){var l=this.quill.getLine(e.index+1),c=m(l,1),u=c[0];if(u){var d=s.formats(),p=this.quill.getFormat(e.index,1);r=x.default.attributes.diff(d,p)||{},i=u.length()}}this.quill.deleteText(e.index,n,A.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(e.index+i-1,n,r,A.default.sources.USER)}}function c(e){this.quill.deleteText(e,A.default.sources.USER),this.quill.setSelection(e.index,A.default.sources.SILENT),this.quill.selection.scrollIntoView()}function u(e,t){var n=this;e.length>0&&this.quill.scroll.deleteAt(e.index,e.length);var r=Object.keys(t.format).reduce(function(e,n){return C.default.query(n,C.default.Scope.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e},{});this.quill.insertText(e.index,"\n",r,A.default.sources.USER),this.quill.setSelection(e.index+1,A.default.sources.SILENT),this.quill.selection.scrollIntoView(),Object.keys(t.format).forEach(function(e){null==r[e]&&(Array.isArray(t.format[e])||"link"!==e&&n.quill.format(e,t.format[e],A.default.sources.USER))})}function d(e){return{key:R.keys.TAB,shiftKey:!e,format:{"code-block":!0},handler:function(t){var n=C.default.query("code-block"),r=t.index,i=t.length,o=this.quill.scroll.descendant(n,r),a=m(o,2),s=a[0],l=a[1];if(null!=s){var c=this.quill.getIndex(s),u=s.newlineIndex(l,!0)+1,d=s.newlineIndex(c+l+i),p=s.domNode.textContent.slice(u,d).split("\n");l=0,p.forEach(function(t,o){e?(s.insertAt(u+l,n.TAB),l+=n.TAB.length,0===o?r+=n.TAB.length:i+=n.TAB.length):t.startsWith(n.TAB)&&(s.deleteAt(u+l,n.TAB.length),l-=n.TAB.length,0===o?r-=n.TAB.length:i-=n.TAB.length),l+=t.length+1}),this.quill.update(A.default.sources.USER),this.quill.setSelection(r,i,A.default.sources.SILENT)}}}}function p(e){return{key:e[0].toUpperCase(),shortKey:!0,handler:function(t,n){this.quill.format(e,!n.format[e],A.default.sources.USER)}}}function f(e){if("string"==typeof e||"number"==typeof e)return f({key:e});if("object"===(void 0===e?"undefined":h(e))&&(e=(0,_.default)(e,!1)),"string"==typeof e.key)if(null!=R.keys[e.key.toUpperCase()])e.key=R.keys[e.key.toUpperCase()];else{if(1!==e.key.length)return null;e.key=e.key.toUpperCase().charCodeAt(0)}return e.shortKey&&(e[P]=e.shortKey,delete e.shortKey),e}Object.defineProperty(t,"__esModule",{value:!0}),t.SHORTKEY=t.default=void 0;var h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=n(19),_=r(v),b=n(11),y=r(b),w=n(3),E=r(w),k=n(20),x=r(k),S=n(0),C=r(S),M=n(6),A=r(M),O=n(10),T=r(O),N=n(9),L=r(N),I=(0,T.default)("quill:keyboard"),P=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",R=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.bindings={},Object.keys(r.options.bindings).forEach(function(e){r.options.bindings[e]&&r.addBinding(r.options.bindings[e])}),r.addBinding({key:t.keys.ENTER,shiftKey:null},u),r.addBinding({key:t.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0},s),r.addBinding({key:t.keys.DELETE},{collapsed:!0},l)):(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},s),r.addBinding({key:t.keys.DELETE},{collapsed:!0,suffix:/^.?$/},l)),r.addBinding({key:t.keys.BACKSPACE},{collapsed:!1},c),r.addBinding({key:t.keys.DELETE},{collapsed:!1},c),r.addBinding({key:t.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},s),r.listen(),r}return a(t,e),g(t,null,[{key:"match",value:function(e,t){return t=f(t),!["altKey","ctrlKey","metaKey","shiftKey"].some(function(n){return!!t[n]!==e[n]&&null!==t[n]})&&t.key===(e.which||e.keyCode)}}]),g(t,[{key:"addBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=f(e);if(null==r||null==r.key)return I.warn("Attempted to add invalid keyboard binding",r);"function"==typeof t&&(t={handler:t}),"function"==typeof n&&(n={handler:n}),r=(0,E.default)(r,t,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var e=this;this.quill.root.addEventListener("keydown",function(n){if(!n.defaultPrevented){var r=n.which||n.keyCode,i=(e.bindings[r]||[]).filter(function(e){return t.match(n,e)});if(0!==i.length){var o=e.quill.getSelection();if(null!=o&&e.quill.hasFocus()){var a=e.quill.getLine(o.index),s=m(a,2),l=s[0],c=s[1],u=e.quill.getLeaf(o.index),d=m(u,2),p=d[0],f=d[1],g=0===o.length?[p,f]:e.quill.getLeaf(o.index+o.length),v=m(g,2),_=v[0],b=v[1],w=p instanceof C.default.Text?p.value().slice(0,f):"",E=_ instanceof C.default.Text?_.value().slice(b):"",k={collapsed:0===o.length,empty:0===o.length&&l.length()<=1,format:e.quill.getFormat(o),offset:c,prefix:w,suffix:E};i.some(function(t){if(null!=t.collapsed&&t.collapsed!==k.collapsed)return!1;if(null!=t.empty&&t.empty!==k.empty)return!1;if(null!=t.offset&&t.offset!==k.offset)return!1;if(Array.isArray(t.format)){if(t.format.every(function(e){return null==k.format[e]}))return!1}else if("object"===h(t.format)&&!Object.keys(t.format).every(function(e){return!0===t.format[e]?null!=k.format[e]:!1===t.format[e]?null==k.format[e]:(0,y.default)(t.format[e],k.format[e])}))return!1;return!(null!=t.prefix&&!t.prefix.test(k.prefix))&&(!(null!=t.suffix&&!t.suffix.test(k.suffix))&&!0!==t.handler.call(e,o,k))})&&n.preventDefault()}}}})}}]),t}(L.default);R.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},R.DEFAULTS={bindings:{bold:p("bold"),italic:p("italic"),underline:p("underline"),indent:{key:R.keys.TAB,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","+1",A.default.sources.USER)}},outdent:{key:R.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","-1",A.default.sources.USER)}},"outdent backspace":{key:R.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["blockquote","indent","list"],offset:0,handler:function(e,t){null!=t.format.indent?this.quill.format("indent","-1",A.default.sources.USER):null!=t.format.blockquote?this.quill.format("blockquote",!1,A.default.sources.USER):null!=t.format.list&&this.quill.format("list",!1,A.default.sources.USER)}},"indent code-block":d(!0),"outdent code-block":d(!1),"remove tab":{key:R.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(e){this.quill.deleteText(e.index-1,1,A.default.sources.USER)}},tab:{key:R.keys.TAB,handler:function(e,t){t.collapsed||this.quill.scroll.deleteAt(e.index,e.length),this.quill.insertText(e.index,"\t",A.default.sources.USER),this.quill.setSelection(e.index+1,A.default.sources.SILENT)}},"list empty enter":{key:R.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(e,t){this.quill.format("list",!1,A.default.sources.USER),t.format.indent&&this.quill.format("indent",!1,A.default.sources.USER)}},"checklist enter":{key:R.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(e){this.quill.scroll.insertAt(e.index,"\n");var t=this.quill.getLine(e.index+1);m(t,1)[0].format("list","unchecked"),this.quill.update(A.default.sources.USER),this.quill.setSelection(e.index+1,A.default.sources.SILENT),this.quill.selection.scrollIntoView()}},"header enter":{key:R.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(e){this.quill.scroll.insertAt(e.index,"\n"),this.quill.formatText(e.index+1,1,"header",!1,A.default.sources.USER),this.quill.setSelection(e.index+1,A.default.sources.SILENT),this.quill.selection.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(1\.|-|\[ ?\]|\[x\])$/,handler:function(e,t){if(null!=this.quill.scroll.whitelist&&!this.quill.scroll.whitelist.list)return!0;var n=t.prefix.length,r=void 0;switch(t.prefix.trim()){case"[]":case"[ ]":r="unchecked";break;case"[x]":r="checked";break;case"-":r="bullet";break;default:r="ordered"}this.quill.scroll.deleteAt(e.index-n,n),this.quill.formatLine(e.index-n,1,"list",r,A.default.sources.USER),this.quill.setSelection(e.index-n,A.default.sources.SILENT)}},"code exit":{key:R.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(e){this.quill.format("code-block",!1,A.default.sources.USER),this.quill.deleteText(e.index-2,1,A.default.sources.USER)}}}},t.default=R,t.SHORTKEY=P},function(e,t,n){"use strict";function r(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter(function(e){return 0===e.indexOf(t+"-")})}var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(13),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.keys=function(e){return(e.getAttribute("class")||"").split(/\s+/).map(function(e){return e.split("-").slice(0,-1).join("-")})},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(this.remove(e),e.classList.add(this.keyName+"-"+t),!0)},t.prototype.remove=function(e){r(e,this.keyName).forEach(function(t){e.classList.remove(t)}),0===e.classList.length&&e.removeAttribute("class")},t.prototype.value=function(e){var t=r(e,this.keyName)[0]||"",n=t.slice(this.keyName.length+1);return this.canAdd(e,n)?n:""},t}(o.default);t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(13),i=n(32),o=n(34),a=n(1),s=function(){function e(e){this.attributes={},this.domNode=e,this.build()}return e.prototype.attribute=function(e,t){t?e.add(this.domNode,t)&&(null!=e.value(this.domNode)?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])},e.prototype.build=function(){var e=this;this.attributes={};var t=r.default.keys(this.domNode),n=i.default.keys(this.domNode),s=o.default.keys(this.domNode);t.concat(n).concat(s).forEach(function(t){var n=a.query(t,a.Scope.ATTRIBUTE);n instanceof r.default&&(e.attributes[n.attrName]=n)})},e.prototype.copy=function(e){var t=this;Object.keys(this.attributes).forEach(function(n){var r=t.attributes[n].value(t.domNode);e.format(n,r)})},e.prototype.move=function(e){var t=this;this.copy(e),Object.keys(this.attributes).forEach(function(e){t.attributes[e].remove(t.domNode)}),this.attributes={}},e.prototype.values=function(){var e=this;return Object.keys(this.attributes).reduce(function(t,n){return t[n]=e.attributes[n].value(e.domNode),t},{})},e}();t.default=s},function(e,t,n){"use strict";function r(e){var t=e.split("-"),n=t.slice(1).map(function(e){return e[0].toUpperCase()+e.slice(1)}).join("");return t[0]+n}var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(13),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.keys=function(e){return(e.getAttribute("style")||"").split(";").map(function(e){return e.split(":")[0].trim()})},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.style[r(this.keyName)]=t,!0)},t.prototype.remove=function(e){e.style[r(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")},t.prototype.value=function(e){var t=e.style[r(this.keyName)];return this.canAdd(e,t)?t:""},t}(o.default);t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(e){this.domNode=e,this.attach()}return Object.defineProperty(e.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),e.create=function(e){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var t;return Array.isArray(this.tagName)?("string"==typeof e&&(e=e.toUpperCase(),parseInt(e).toString()===e&&(e=parseInt(e))),t="number"==typeof e?document.createElement(this.tagName[e-1]):this.tagName.indexOf(e)>-1?document.createElement(e):document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t},e.prototype.attach=function(){this.domNode[r.DATA_KEY]={blot:this}},e.prototype.clone=function(){var e=this.domNode.cloneNode();return r.create(e)},e.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},e.prototype.deleteAt=function(e,t){this.isolate(e,t).remove()},e.prototype.formatAt=function(e,t,n,i){var o=this.isolate(e,t);if(null!=r.query(n,r.Scope.BLOT)&&i)o.wrap(n,i);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var a=r.create(this.statics.scope);o.wrap(a),a.format(n,i)}},e.prototype.insertAt=function(e,t,n){var i=null==n?r.create("text",t):r.create(t,n),o=this.split(e);this.parent.insertBefore(i,o)},e.prototype.insertInto=function(e,t){if(null!=this.parent&&this.parent.children.remove(this),e.children.insertBefore(this,t),null!=t)var n=t.domNode;null!=this.next&&this.domNode.nextSibling==n||e.domNode.insertBefore(this.domNode,void 0!==n?n:null),this.parent=e},e.prototype.isolate=function(e,t){var n=this.split(e);return n.split(t),n},e.prototype.length=function(){return 1},e.prototype.offset=function(e){return void 0===e&&(e=this.parent),null==this.parent||this==e?0:this.parent.children.offset(this)+this.parent.offset(e)},e.prototype.optimize=function(){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},e.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},e.prototype.replace=function(e){null!=e.parent&&(e.parent.insertBefore(this,e.next),e.remove())},e.prototype.replaceWith=function(e,t){var n="string"==typeof e?r.create(e,t):e;return n.replace(this),n},e.prototype.split=function(e,t){return 0===e?this:this.next},e.prototype.update=function(e){void 0===e&&(e=[])},e.prototype.wrap=function(e,t){var n="string"==typeof e?r.create(e,t):e;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},e}();i.blotName="abstract",t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlignStyle=t.AlignClass=t.AlignAttribute=void 0;var r=n(0),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o={scope:i.default.Scope.BLOCK,whitelist:["right","center","justify"]},a=new i.default.Attributor.Attribute("align","align",o),s=new i.default.Attributor.Class("align","ql-align",o),l=new i.default.Attributor.Style("align","text-align",o);t.AlignAttribute=a,t.AlignClass=s,t.AlignStyle=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackgroundStyle=t.BackgroundClass=void 0;var r=n(0),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o=n(26),a=new i.default.Attributor.Class("background","ql-bg",{scope:i.default.Scope.INLINE}),s=new o.ColorAttributor("background","background-color",{scope:i.default.Scope.INLINE});t.BackgroundClass=a,t.BackgroundStyle=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectionStyle=t.DirectionClass=t.DirectionAttribute=void 0;var r=n(0),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o={scope:i.default.Scope.BLOCK,whitelist:["rtl"]},a=new i.default.Attributor.Attribute("direction","dir",o),s=new i.default.Attributor.Class("direction","ql-direction",o),l=new i.default.Attributor.Style("direction","direction",o);t.DirectionAttribute=a,t.DirectionClass=s,t.DirectionStyle=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.FontClass=t.FontStyle=void 0;var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},l=n(0),c=function(e){return e&&e.__esModule?e:{default:e}}(l),u={scope:c.default.Scope.INLINE,whitelist:["serif","monospace"]},d=new c.default.Attributor.Class("font","ql-font",u),p=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),a(t,[{key:"value",value:function(e){return s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e).replace(/["']/g,"")}}]),t}(c.default.Attributor.Style),f=new p("font","font-family",u);t.FontStyle=f,t.FontClass=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SizeStyle=t.SizeClass=void 0;var r=n(0),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o=new i.default.Attributor.Class("size","ql-size",{scope:i.default.Scope.INLINE,whitelist:["small","large","huge"]}),a=new i.default.Attributor.Style("size","font-size",{scope:i.default.Scope.INLINE,whitelist:["10px","18px","32px"]});t.SizeClass=o,t.SizeStyle=a},function(e,t,n){"use strict";e.exports={align:{"":n(79),center:n(77),right:n(80),justify:n(78)},background:n(81),blockquote:n(82),bold:n(83),clean:n(84),code:n(55),"code-block":n(55),color:n(85),direction:{"":n(86),rtl:n(87)},float:{center:n(89),full:n(90),left:n(91),right:n(92)},formula:n(93),header:{1:n(95),2:n(94)},italic:n(98),image:n(96),indent:{"+1":n(97),"-1":n(103)},link:n(99),list:{ordered:n(102),bullet:n(100),check:n(101)},script:{sub:n(105),super:n(106)},strike:n(104),underline:n(107),video:n(108)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){var t=e.ops[e.ops.length-1];return null!=t&&(null!=t.insert?"string"==typeof t.insert&&t.insert.endsWith("\n"):null!=t.attributes&&Object.keys(t.attributes).some(function(e){return null!=d.default.query(e,d.default.Scope.BLOCK)}))}function l(e){var t=e.reduce(function(e,t){return e+=t.delete||0},0),n=e.length()-t;return s(e)&&(n-=1),n}Object.defineProperty(t,"__esModule",{value:!0}),t.getLastChangeIndex=t.default=void 0;var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),d=r(u),p=n(6),f=r(p),h=n(9),m=r(h),g=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.lastRecorded=0,r.ignoreChange=!1,r.clear(),r.quill.on(f.default.events.EDITOR_CHANGE,function(e,t,n,i){e!==f.default.events.TEXT_CHANGE||r.ignoreChange||(r.options.userOnly&&i!==f.default.sources.USER?r.transform(t):r.record(t,n))}),r.quill.keyboard.addBinding({key:"Z",shortKey:!0},r.undo.bind(r)),r.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},r.redo.bind(r)),/Win/i.test(navigator.platform)&&r.quill.keyboard.addBinding({key:"Y",shortKey:!0},r.redo.bind(r)),r}return a(t,e),c(t,[{key:"change",value:function(e,t){if(0!==this.stack[e].length){var n=this.stack[e].pop();this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[e],f.default.sources.USER),this.ignoreChange=!1;var r=l(n[e]);this.quill.setSelection(r),this.quill.selection.scrollIntoView(),this.stack[t].push(n)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"record",value:function(e,t){if(0!==e.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(t),r=Date.now();if(this.lastRecorded+this.options.delay>r&&this.stack.undo.length>0){var i=this.stack.undo.pop();n=n.compose(i.undo),e=i.redo.compose(e)}else this.lastRecorded=r;this.stack.undo.push({redo:e,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(e){this.stack.undo.forEach(function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)}),this.stack.redo.forEach(function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),t}(m.default);g.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t.default=g,t.getLastChangeIndex=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){var t=e.match(/^(https?):\/\/(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(https?):\/\/(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?t[1]+"://www.youtube.com/embed/"+t[2]+"?showinfo=0":(t=e.match(/^(https?):\/\/(?:www\.)?vimeo\.com\/(\d+)/))?t[1]+"://player.vimeo.com/video/"+t[2]+"/":e}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach(function(t){var r=document.createElement("option");t===n?r.setAttribute("selected","selected"):r.setAttribute("value",t),e.appendChild(r)})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BaseTooltip=void 0;var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},d=n(3),p=r(d),f=n(2),h=r(f),m=n(5),g=r(m),v=n(31),_=r(v),b=n(30),y=r(b),w=n(48),E=r(w),k=n(49),x=r(k),S=n(28),C=r(S),M=n(50),A=r(M),O=[!1,"center","right","justify"],T=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],N=[!1,"serif","monospace"],L=["1","2","3",!1],I=["small",!1,"large","huge"],P=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n)),a=function t(n){if(!document.body.contains(e.root))return document.body.removeEventListener("click",t);null==r.tooltip||r.tooltip.root.contains(n.target)||document.activeElement===r.tooltip.textbox||r.quill.hasFocus()||r.tooltip.hide(),null!=r.pickers&&r.pickers.forEach(function(e){e.container.contains(n.target)||e.close()})};return document.body.addEventListener("click",a),r}return a(t,e),c(t,[{key:"addModule",value:function(e){var n=u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addModule",this).call(this,e);return"toolbar"===e&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(e,t){e.forEach(function(e){(e.getAttribute("class")||"").split(/\s+/).forEach(function(n){if(n.startsWith("ql-")&&(n=n.slice("ql-".length),null!=t[n]))if("direction"===n)e.innerHTML=t[n][""]+t[n].rtl;else if("string"==typeof t[n])e.innerHTML=t[n];else{var r=e.value||"";null!=r&&t[n][r]&&(e.innerHTML=t[n][r])}})})}},{key:"buildPickers",value:function(e,t){var n=this;this.pickers=e.map(function(e){if(e.classList.contains("ql-align"))return null==e.querySelector("option")&&l(e,O),new x.default(e,t.align);if(e.classList.contains("ql-background")||e.classList.contains("ql-color")){var n=e.classList.contains("ql-background")?"background":"color";return null==e.querySelector("option")&&l(e,T,"background"===n?"#ffffff":"#000000"),new E.default(e,t[n])}return null==e.querySelector("option")&&(e.classList.contains("ql-font")?l(e,N):e.classList.contains("ql-header")?l(e,L):e.classList.contains("ql-size")&&l(e,I)),new C.default(e)});var r=function(){n.pickers.forEach(function(e){e.update()})};this.quill.on(g.default.events.EDITOR_CHANGE,r)}}]),t}(y.default);P.DEFAULTS=(0,p.default)(!0,{},y.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var e=this,t=this.container.querySelector("input.ql-image[type=file]");null==t&&(t=document.createElement("input"),t.setAttribute("type","file"),t.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),t.classList.add("ql-image"),t.addEventListener("change",function(){if(null!=t.files&&null!=t.files[0]){var n=new FileReader;n.onload=function(n){var r=e.quill.getSelection(!0);e.quill.updateContents((new h.default).retain(r.index).delete(r.length).insert({image:n.target.result}),g.default.sources.USER),t.value=""},n.readAsDataURL(t.files[0])}}),this.container.appendChild(t)),t.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var R=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.textbox=r.root.querySelector('input[type="text"]'),r.listen(),r}return a(t,e),c(t,[{key:"listen",value:function(){var e=this;this.textbox.addEventListener("keydown",function(t){_.default.match(t,"enter")?(e.save(),t.preventDefault()):_.default.match(t,"escape")&&(e.cancel(),t.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=t?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+e)||""),this.root.setAttribute("data-mode",e)}},{key:"restoreFocus",value:function(){var e=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=e}},{key:"save",value:function(){var e=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var t=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,g.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,g.default.sources.USER)),this.quill.root.scrollTop=t;break;case"video":e=s(e);case"formula":if(!e)break;var n=this.quill.getSelection(!0);if(null!=n){var r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),e,g.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(r+1," ",g.default.sources.USER),this.quill.setSelection(r+2,g.default.sources.USER)}}this.textbox.value="",this.hide()}}]),t}(A.default);t.BaseTooltip=R,t.default=P},function(e,t,n){"use strict";var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return arguments.length>1&&!this.contains(e)==!t?t:i.call(this,e)}}String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var n=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return-1!==r&&r===t}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var t,n=Object(this),r=n.length>>>0,i=arguments[1],o=0;o<r;o++)if(t=n[o],e.call(i,t,o,n))return t}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},l=n(8),c=function(e){return e&&e.__esModule?e:{default:e}}(l),u=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),a(t,[{key:"optimize",value:function(){s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return s(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),t}(c.default);u.blotName="bold",u.tagName=["STRONG","B"],t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e,t,n){return"object"===(void 0===t?"undefined":x(t))?Object.keys(t).reduce(function(e,n){return c(e,n,t[n])},e):e.reduce(function(e,r){return r.attributes&&r.attributes[t]?e.push(r):e.insert(r.insert,(0,A.default)({},i({},t,n),r.attributes))},new T.default)}function u(e){if(e.nodeType!==Node.ELEMENT_NODE)return{};return e["__ql-computed-style"]||(e["__ql-computed-style"]=window.getComputedStyle(e))}function d(e,t){for(var n="",r=e.ops.length-1;r>=0&&n.length<t.length;--r){var i=e.ops[r];if("string"!=typeof i.insert)break;n=i.insert+n}return n.slice(-1*t.length)===t}function p(e){if(0===e.childNodes.length)return!1;var t=u(e);return["block","list-item"].indexOf(t.display)>-1}function f(e,t,n){return e.nodeType===e.TEXT_NODE?n.reduce(function(t,n){return n(e,t)},new T.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],function(r,i){var o=f(i,t,n);return i.nodeType===e.ELEMENT_NODE&&(o=t.reduce(function(e,t){return t(i,e)},o),o=(i[Y]||[]).reduce(function(e,t){return t(i,e)},o)),r.concat(o)},new T.default):new T.default}function h(e,t,n){return c(n,e,!0)}function m(e,t){var n=L.default.Attributor.Attribute.keys(e),r=L.default.Attributor.Class.keys(e),i=L.default.Attributor.Style.keys(e),o={};return n.concat(r).concat(i).forEach(function(t){var n=L.default.query(t,L.default.Scope.ATTRIBUTE);null!=n&&(o[n.attrName]=n.value(e),o[n.attrName])||(n=K[t],null!=n&&n.attrName===t&&(o[n.attrName]=n.value(e)||void 0),null!=(n=X[t])&&n.attrName===t&&(n=X[t],o[n.attrName]=n.value(e)||void 0))}),Object.keys(o).length>0&&(t=c(t,o)),t}function g(e,t){var n=L.default.query(e);if(null==n)return t;if(n.prototype instanceof L.default.Embed){var r={},i=n.value(e);null!=i&&(r[n.blotName]=i,t=(new T.default).insert(r,n.formats(e)))}else"function"==typeof n.formats&&(t=c(t,n.blotName,n.formats(e)));return t}function v(e,t){return d(t,"\n")||t.insert("\n"),t}function _(){return new T.default}function b(e,t){var n=L.default.query(e);if(null==n||"list-item"!==n.blotName||!d(t,"\n"))return t;for(var r=-1,i=e.parentNode;!i.classList.contains("ql-clipboard");)"list"===(L.default.query(i)||{}).blotName&&(r+=1),i=i.parentNode;return r<=0?t:t.compose((new T.default).retain(t.length()-1).retain(1,{indent:r}))}function y(e,t){return d(t,"\n")||(p(e)||t.length()>0&&e.nextSibling&&p(e.nextSibling))&&t.insert("\n"),t}function w(e,t){if(p(e)&&null!=e.nextElementSibling&&!d(t,"\n\n")){var n=e.offsetHeight+parseFloat(u(e).marginTop)+parseFloat(u(e).marginBottom);e.nextElementSibling.offsetTop>e.offsetTop+1.5*n&&t.insert("\n")}return t}function E(e,t){var n={},r=e.style||{};return r.fontStyle&&"italic"===u(e).fontStyle&&(n.italic=!0),r.fontWeight&&(u(e).fontWeight.startsWith("bold")||parseInt(u(e).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(t=c(t,n)),parseFloat(r.textIndent||0)>0&&(t=(new T.default).insert("\t").concat(t)),t}function k(e,t){var n=e.data;if("O:P"===e.parentNode.tagName)return t.insert(n.trim());if(0===n.trim().length&&e.parentNode.classList.contains("ql-clipboard"))return t;if(!u(e.parentNode).whiteSpace.startsWith("pre")){var r=function(e,t){return t=t.replace(/[^\u00a0]/g,""),t.length<1&&e?" ":t};n=n.replace(/\r\n/g," ").replace(/\n/g," "),n=n.replace(/\s\s+/g,r.bind(r,!0)),(null==e.previousSibling&&p(e.parentNode)||null!=e.previousSibling&&p(e.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==e.nextSibling&&p(e.parentNode)||null!=e.nextSibling&&p(e.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return t.insert(n)}Object.defineProperty(t,"__esModule",{value:!0}),t.matchText=t.matchSpacing=t.matchNewline=t.matchBlot=t.matchAttributor=t.default=void 0;var x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),C=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),M=n(3),A=r(M),O=n(2),T=r(O),N=n(0),L=r(N),I=n(6),P=r(I),R=n(10),D=r(R),V=n(9),B=r(V),F=n(36),j=n(37),W=n(26),U=n(38),q=n(39),H=n(40),z=(0,D.default)("quill:clipboard"),Y="__ql-matcher",G=[[Node.TEXT_NODE,k],[Node.TEXT_NODE,y],["br",v],[Node.ELEMENT_NODE,y],[Node.ELEMENT_NODE,g],[Node.ELEMENT_NODE,w],[Node.ELEMENT_NODE,m],[Node.ELEMENT_NODE,E],["li",b],["b",h.bind(h,"bold")],["i",h.bind(h,"italic")],["style",_]],K=[F.AlignAttribute,U.DirectionAttribute].reduce(function(e,t){return e[t.keyName]=t,e},{}),X=[F.AlignStyle,j.BackgroundStyle,W.ColorStyle,U.DirectionStyle,q.FontStyle,H.SizeStyle].reduce(function(e,t){return e[t.keyName]=t,e},{}),Z=function(e){function t(e,n){a(this,t);var r=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],G.concat(r.options.matchers).forEach(function(e){r.addMatcher.apply(r,o(e))}),r}return l(t,e),C(t,[{key:"addMatcher",value:function(e,t){this.matchers.push([e,t])}},{key:"convert",value:function(e){"string"==typeof e&&(this.container.innerHTML=e.replace(/\>\r?\n +\</g,"><"));var t=this.prepareMatching(),n=S(t,2),r=n[0],i=n[1],o=f(this.container,r,i);return d(o,"\n")&&null==o.ops[o.ops.length-1].attributes&&(o=o.compose((new T.default).retain(o.length()-1).delete(1))),z.log("convert",this.container.innerHTML,o),this.container.innerHTML="",o}},{key:"dangerouslyPasteHTML",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:P.default.sources.API;if("string"==typeof e)return this.quill.setContents(this.convert(e),t);var r=this.convert(t);return this.quill.updateContents((new T.default).retain(e).concat(r),n)}},{key:"onPaste",value:function(e){var t=this;if(!e.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new T.default).retain(n.index),i=this.quill.scrollingContainer.scrollTop;this.container.focus(),setTimeout(function(){t.quill.selection.update(P.default.sources.SILENT),r=r.concat(t.convert()).delete(n.length),t.quill.updateContents(r,P.default.sources.USER),t.quill.setSelection(r.length()-n.length,P.default.sources.SILENT),t.quill.scrollingContainer.scrollTop=i,t.quill.selection.scrollIntoView()},1)}}},{key:"prepareMatching",value:function(){var e=this,t=[],n=[];return this.matchers.forEach(function(r){var i=S(r,2),o=i[0],a=i[1];switch(o){case Node.TEXT_NODE:n.push(a);break;case Node.ELEMENT_NODE:t.push(a);break;default:[].forEach.call(e.container.querySelectorAll(o),function(e){e[Y]=e[Y]||[],e[Y].push(a)})}}),[t,n]}}]),t}(B.default);Z.DEFAULTS={matchers:[]},t.default=Z,t.matchAttributor=m,t.matchBlot=g,t.matchNewline=y,t.matchSpacing=w,t.matchText=k},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t,n){var r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("ql-"+t),null!=n&&(r.value=n),e.appendChild(r)}function c(e,t){Array.isArray(t[0])||(t=[t]),t.forEach(function(t){var n=document.createElement("span");n.classList.add("ql-formats"),t.forEach(function(e){if("string"==typeof e)l(n,e);else{var t=Object.keys(e)[0],r=e[t];Array.isArray(r)?u(n,t,r):l(n,t,r)}}),e.appendChild(n)})}function u(e,t,n){var r=document.createElement("select");r.classList.add("ql-"+t),n.forEach(function(e){var t=document.createElement("option");!1!==e?t.setAttribute("value",e):t.setAttribute("selected","selected"),r.appendChild(t)}),e.appendChild(r)}Object.defineProperty(t,"__esModule",{value:!0}),t.addControls=t.default=void 0;var d=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(2),h=r(f),m=n(0),g=r(m),v=n(6),_=r(v),b=n(10),y=r(b),w=n(9),E=r(w),k=(0,y.default)("quill:toolbar"),x=function(e){function t(e,n){o(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if(Array.isArray(r.options.container)){var i=document.createElement("div");c(i,r.options.container),e.container.parentNode.insertBefore(i,e.container),r.container=i}else"string"==typeof r.options.container?r.container=document.querySelector(r.options.container):r.container=r.options.container;if(!(r.container instanceof HTMLElement)){var s;return s=k.error("Container required for toolbar",r.options),a(r,s)}return r.container.classList.add("ql-toolbar"),r.controls=[],r.handlers={},Object.keys(r.options.handlers).forEach(function(e){r.addHandler(e,r.options.handlers[e])}),[].forEach.call(r.container.querySelectorAll("button, select"),function(e){r.attach(e)}),r.quill.on(_.default.events.EDITOR_CHANGE,function(e,t){e===_.default.events.SELECTION_CHANGE&&r.update(t)}),r.quill.on(_.default.events.SCROLL_OPTIMIZE,function(){var e=r.quill.selection.getRange(),t=d(e,1),n=t[0];r.update(n)}),r}return s(t,e),p(t,[{key:"addHandler",value:function(e,t){this.handlers[e]=t}},{key:"attach",value:function(e){var t=this,n=[].find.call(e.classList,function(e){return 0===e.indexOf("ql-")});if(n){if(n=n.slice("ql-".length),"BUTTON"===e.tagName&&e.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void k.warn("ignoring attaching to disabled format",n,e);if(null==g.default.query(n))return void k.warn("ignoring attaching to nonexistent format",n,e)}var r="SELECT"===e.tagName?"change":"click";e.addEventListener(r,function(r){var o=void 0;if("SELECT"===e.tagName){if(e.selectedIndex<0)return;var a=e.options[e.selectedIndex];o=!a.hasAttribute("selected")&&(a.value||!1)}else o=!e.classList.contains("ql-active")&&(e.value||!e.hasAttribute("value")),r.preventDefault();t.quill.focus();var s=t.quill.selection.getRange(),l=d(s,1),c=l[0];if(null!=t.handlers[n])t.handlers[n].call(t,o);else if(g.default.query(n).prototype instanceof g.default.Embed){if(!(o=prompt("Enter "+n)))return;t.quill.updateContents((new h.default).retain(c.index).delete(c.length).insert(i({},n,o)),_.default.sources.USER)}else t.quill.format(n,o,_.default.sources.USER);t.update(c)}),this.controls.push([n,e])}}},{key:"update",value:function(e){var t=null==e?{}:this.quill.getFormat(e);this.controls.forEach(function(n){var r=d(n,2),i=r[0],o=r[1];if("SELECT"===o.tagName){var a=void 0;if(null==e)a=null;else if(null==t[i])a=o.querySelector("option[selected]");else if(!Array.isArray(t[i])){var s=t[i];"string"==typeof s&&(s=s.replace(/\"/g,'\\"')),a=o.querySelector('option[value="'+s+'"]')}null==a?(o.value="",o.selectedIndex=-1):a.selected=!0}else if(null==e)o.classList.remove("ql-active");else if(o.hasAttribute("value")){var l=t[i]===o.getAttribute("value")||null!=t[i]&&t[i].toString()===o.getAttribute("value")||null==t[i]&&!o.getAttribute("value");o.classList.toggle("ql-active",l)}else o.classList.toggle("ql-active",null!=t[i])})}}]),t}(E.default);x.DEFAULTS={},x.DEFAULTS={container:null,handlers:{clean:function(){var e=this,t=this.quill.getSelection();if(null!=t)if(0==t.length){var n=this.quill.getFormat();Object.keys(n).forEach(function(t){null!=g.default.query(t,g.default.Scope.INLINE)&&e.quill.format(t,!1)})}else this.quill.removeFormat(t,_.default.sources.USER)},direction:function(e){var t=this.quill.getFormat().align;"rtl"===e&&null==t?this.quill.format("align","right",_.default.sources.USER):e||"right"!==t||this.quill.format("align",!1,_.default.sources.USER),this.quill.format("direction",e,_.default.sources.USER)},indent:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0);if("+1"===e||"-1"===e){var i="+1"===e?1:-1;"rtl"===n.direction&&(i*=-1),this.quill.format("indent",r+i,_.default.sources.USER)}},link:function(e){!0===e&&(e=prompt("Enter link URL:")),this.quill.format("link",e,_.default.sources.USER)},list:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t);"check"===e?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,_.default.sources.USER):this.quill.format("list","unchecked",_.default.sources.USER):this.quill.format("list",e,_.default.sources.USER)}}},t.default=x,t.addControls=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},l=n(28),c=function(e){return e&&e.__esModule?e:{default:e}}(l),u=function(e){function t(e,n){r(this,t);var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.label.innerHTML=n,o.container.classList.add("ql-color-picker"),[].slice.call(o.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(e){e.classList.add("ql-primary")}),o}return o(t,e),a(t,[{key:"buildItem",value:function(e){var n=s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"buildItem",this).call(this,e);return n.style.backgroundColor=e.getAttribute("value")||"",n}},{key:"selectItem",value:function(e,n){s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n);var r=this.label.querySelector(".ql-color-label"),i=e?e.getAttribute("data-value")||"":"";r&&("line"===r.tagName?r.style.stroke=i:r.style.fill=i)}}]),t}(c.default);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},l=n(28),c=function(e){return e&&e.__esModule?e:{default:e}}(l),u=function(e){function t(e,n){r(this,t);var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.container.classList.add("ql-icon-picker"),[].forEach.call(o.container.querySelectorAll(".ql-picker-item"),function(e){e.innerHTML=n[e.getAttribute("data-value")||""]}),o.defaultItem=o.container.querySelector(".ql-selected"),o.selectItem(o.defaultItem),o}return o(t,e),a(t,[{key:"selectItem",value:function(e,n){s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n),e=e||this.defaultItem,this.label.innerHTML=e.innerHTML}}]),t}(c.default);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t,n){var i=this;r(this,e),this.quill=t,this.boundsContainer=n||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){i.root.style.marginTop=-1*i.quill.root.scrollTop+"px"}),this.hide()}return i(e,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(e){var t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=t+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var r=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect(),o=0;if(i.right>r.right&&(o=r.right-i.right,this.root.style.left=t+o+"px"),i.left<r.left&&(o=r.left-i.left,this.root.style.left=t+o+"px"),i.bottom>r.bottom){var a=i.bottom-i.top,s=e.bottom-e.top+a;this.root.style.top=n-s+"px",this.root.classList.add("ql-flip")}return o}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),e}();t.default=o},function(e,t){function n(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function r(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}var i="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();t=e.exports=i?n:r,t.supported=n,t.unsupported=r},function(e,t){function n(e){var t=[];for(var n in e)t.push(n);return t}t=e.exports="function"==typeof Object.keys?Object.keys:n,t.shim=n},function(e,t){"use strict";function n(){}function r(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(){this._events=new n,this._eventsCount=0}var o=Object.prototype.hasOwnProperty,a="~";Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(a=!1)),i.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)o.call(e,t)&&n.push(a?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},i.prototype.listeners=function(e,t){var n=a?a+e:e,r=this._events[n];if(t)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,s=new Array(o);i<o;i++)s[i]=r[i].fn;return s},i.prototype.emit=function(e,t,n,r,i,o){var s=a?a+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,r),!0;case 5:return u.fn.call(u.context,t,n,r,i),!0;case 6:return u.fn.call(u.context,t,n,r,i,o),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var p,f=u.length;for(c=0;c<f;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,n);break;case 4:u[c].fn.call(u[c].context,t,n,r);break;default:if(!l)for(p=1,l=new Array(d-1);p<d;p++)l[p-1]=arguments[p];u[c].fn.apply(u[c].context,l)}}return!0},i.prototype.on=function(e,t,n){var i=new r(t,n||this),o=a?a+e:e;return this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],i]:this._events[o].push(i):(this._events[o]=i,this._eventsCount++),this},i.prototype.once=function(e,t,n){var i=new r(t,n||this,!0),o=a?a+e:e;return this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],i]:this._events[o].push(i):(this._events[o]=i,this._eventsCount++),this},i.prototype.removeListener=function(e,t,r,i){var o=a?a+e:e;if(!this._events[o])return this;if(!t)return 0==--this._eventsCount?this._events=new n:delete this._events[o],this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||(0==--this._eventsCount?this._events=new n:delete this._events[o]);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||i&&!s[l].once||r&&s[l].context!==r)&&c.push(s[l]);c.length?this._events[o]=1===c.length?c[0]:c:0==--this._eventsCount?this._events=new n:delete this._events[o]}return this},i.prototype.removeAllListeners=function(e){var t;return e?(t=a?a+e:e,this._events[t]&&(0==--this._eventsCount?this._events=new n:delete this._events[t])):(this._events=new n,this._eventsCount=0),this},i.prototype.off=i.prototype.removeListener,i.prototype.addListener=i.prototype.on,i.prototype.setMaxListeners=function(){return this},i.prefixed=a,i.EventEmitter=i,void 0!==e&&(e.exports=i)},function(e,t){function n(e,t,n){if(e==t)return e?[[m,e]]:[];(n<0||e.length<n)&&(n=null);var i=a(e,t),o=e.substring(0,i);e=e.substring(i),t=t.substring(i),i=s(e,t);var l=e.substring(e.length-i);e=e.substring(0,e.length-i),t=t.substring(0,t.length-i);var u=r(e,t);return o&&u.unshift([m,o]),l&&u.push([m,l]),c(u),null!=n&&(u=d(u,n)),u}function r(e,t){var r;if(!e)return[[h,t]];if(!t)return[[f,e]];var o=e.length>t.length?e:t,a=e.length>t.length?t:e,s=o.indexOf(a);if(-1!=s)return r=[[h,o.substring(0,s)],[m,a],[h,o.substring(s+a.length)]],e.length>t.length&&(r[0][0]=r[2][0]=f),r;if(1==a.length)return[[f,e],[h,t]];var c=l(e,t);if(c){var u=c[0],d=c[1],p=c[2],g=c[3],v=c[4],_=n(u,p),b=n(d,g);return _.concat([[m,v]],b)}return i(e,t)}function i(e,t){for(var n=e.length,r=t.length,i=Math.ceil((n+r)/2),a=i,s=2*i,l=new Array(s),c=new Array(s),u=0;u<s;u++)l[u]=-1,c[u]=-1;l[a+1]=0,c[a+1]=0;for(var d=n-r,p=d%2!=0,m=0,g=0,v=0,_=0,b=0;b<i;b++){for(var y=-b+m;y<=b-g;y+=2){var w,E=a+y;w=y==-b||y!=b&&l[E-1]<l[E+1]?l[E+1]:l[E-1]+1;for(var k=w-y;w<n&&k<r&&e.charAt(w)==t.charAt(k);)w++,k++;if(l[E]=w,w>n)g+=2;else if(k>r)m+=2;else if(p){var x=a+d-y;if(x>=0&&x<s&&-1!=c[x]){var S=n-c[x];if(w>=S)return o(e,t,w,k)}}}for(var C=-b+v;C<=b-_;C+=2){var S,x=a+C;S=C==-b||C!=b&&c[x-1]<c[x+1]?c[x+1]:c[x-1]+1;for(var M=S-C;S<n&&M<r&&e.charAt(n-S-1)==t.charAt(r-M-1);)S++,M++;if(c[x]=S,S>n)_+=2;else if(M>r)v+=2;else if(!p){var E=a+d-C;if(E>=0&&E<s&&-1!=l[E]){var w=l[E],k=a+w-E;if(S=n-S,w>=S)return o(e,t,w,k)}}}}return[[f,e],[h,t]]}function o(e,t,r,i){var o=e.substring(0,r),a=t.substring(0,i),s=e.substring(r),l=t.substring(i),c=n(o,a),u=n(s,l);return c.concat(u)}function a(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(o,i)==t.substring(o,i)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return i}function s(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(e.length-i,e.length-o)==t.substring(t.length-i,t.length-o)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return i}function l(e,t){function n(e,t,n){for(var r,i,o,l,c=e.substring(n,n+Math.floor(e.length/4)),u=-1,d="";-1!=(u=t.indexOf(c,u+1));){var p=a(e.substring(n),t.substring(u)),f=s(e.substring(0,n),t.substring(0,u));d.length<f+p&&(d=t.substring(u-f,u)+t.substring(u,u+p),r=e.substring(0,n-f),i=e.substring(n+p),o=t.substring(0,u-f),l=t.substring(u+p))}return 2*d.length>=e.length?[r,i,o,l,d]:null}var r=e.length>t.length?e:t,i=e.length>t.length?t:e;if(r.length<4||2*i.length<r.length)return null;var o,l=n(r,i,Math.ceil(r.length/4)),c=n(r,i,Math.ceil(r.length/2));if(!l&&!c)return null;o=c?l&&l[4].length>c[4].length?l:c:l;var u,d,p,f;return e.length>t.length?(u=o[0],d=o[1],p=o[2],f=o[3]):(p=o[0],f=o[1],u=o[2],d=o[3]),[u,d,p,f,o[4]]}function c(e){e.push([m,""]);for(var t,n=0,r=0,i=0,o="",l="";n<e.length;)switch(e[n][0]){case h:i++,l+=e[n][1],n++;break;case f:r++,o+=e[n][1],n++;break;case m:r+i>1?(0!==r&&0!==i&&(t=a(l,o),0!==t&&(n-r-i>0&&e[n-r-i-1][0]==m?e[n-r-i-1][1]+=l.substring(0,t):(e.splice(0,0,[m,l.substring(0,t)]),n++),l=l.substring(t),o=o.substring(t)),0!==(t=s(l,o))&&(e[n][1]=l.substring(l.length-t)+e[n][1],l=l.substring(0,l.length-t),o=o.substring(0,o.length-t))),0===r?e.splice(n-i,r+i,[h,l]):0===i?e.splice(n-r,r+i,[f,o]):e.splice(n-r-i,r+i,[f,o],[h,l]),n=n-r-i+(r?1:0)+(i?1:0)+1):0!==n&&e[n-1][0]==m?(e[n-1][1]+=e[n][1],e.splice(n,1)):n++,i=0,r=0,o="",l=""}""===e[e.length-1][1]&&e.pop();var u=!1;for(n=1;n<e.length-1;)e[n-1][0]==m&&e[n+1][0]==m&&(e[n][1].substring(e[n][1].length-e[n-1][1].length)==e[n-1][1]?(e[n][1]=e[n-1][1]+e[n][1].substring(0,e[n][1].length-e[n-1][1].length),e[n+1][1]=e[n-1][1]+e[n+1][1],e.splice(n-1,1),u=!0):e[n][1].substring(0,e[n+1][1].length)==e[n+1][1]&&(e[n-1][1]+=e[n+1][1],e[n][1]=e[n][1].substring(e[n+1][1].length)+e[n+1][1],e.splice(n+1,1),u=!0)),n++;u&&c(e)}function u(e,t){if(0===t)return[m,e];for(var n=0,r=0;r<e.length;r++){var i=e[r];if(i[0]===f||i[0]===m){var o=n+i[1].length;if(t===o)return[r+1,e];if(t<o){e=e.slice();var a=t-n,s=[i[0],i[1].slice(0,a)],l=[i[0],i[1].slice(a)];return e.splice(r,1,s,l),[r+1,e]}n=o}}throw new Error("cursor_pos is out of bounds!")}function d(e,t){var n=u(e,t),r=n[1],i=n[0],o=r[i],a=r[i+1];if(null==o)return e;if(o[0]!==m)return e;if(null!=a&&o[1]+a[1]===a[1]+o[1])return r.splice(i,2,a,o),p(r,i,2);if(null!=a&&0===a[1].indexOf(o[1])){r.splice(i,2,[a[0],o[1]],[0,o[1]]);var s=a[1].slice(o[1].length);return s.length>0&&r.splice(i+2,0,[a[0],s]),p(r,i,3)}return e}function p(e,t,n){for(var r=t+n-1;r>=0&&r>=t-1;r--)if(r+1<e.length){var i=e[r],o=e[r+1];i[0]===o[1]&&e.splice(r,2,[i[0],i[1]+o[1]])}return e}var f=-1,h=1,m=0,g=n;g.INSERT=h,g.DELETE=f,g.EQUAL=m,e.exports=g},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(22),o=n(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(n){var r=o.query(t.blotName).tagName;if(n.tagName!==r)return e.formats.call(this,n)},t.prototype.format=function(n,r){null!=o.query(n,o.Scope.BLOCK)&&(n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):this.replaceWith(t.blotName))},t.prototype.formatAt=function(t,n,r,i){null!=o.query(r,o.Scope.BLOCK)?this.format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.insertAt=function(t,n,r){if(null==r||null!=o.query(n,o.Scope.INLINE))e.prototype.insertAt.call(this,t,n,r);else{var i=this.split(t),a=o.create(n,r);i.parent.insertBefore(a,i)}},t.prototype.update=function(t){navigator.userAgent.match(/Trident/)?this.attach():e.prototype.update.call(this,t)},t}(i.default);a.blotName="block",a.scope=o.Scope.BLOCK_BLOT,a.tagName="P",t.default=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(23),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(e){},t.prototype.format=function(t,n){e.prototype.formatAt.call(this,0,this.length(),t,n)},t.prototype.formatAt=function(t,n,r,i){0===t&&n===this.length()?this.format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.formats=function(){return this.statics.formats(this.domNode)},t}(i.default);t.default=o},function(e,t,n){"use strict";function r(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(22),a=n(1),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.formats=function(n){if(n.tagName!==t.tagName)return e.formats.call(this,n)},t.prototype.format=function(n,r){var i=this;n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):(this.children.forEach(function(e){e instanceof o.default||(e=e.wrap(t.blotName,!0)),i.attributes.copy(e)}),this.unwrap())},t.prototype.formatAt=function(t,n,r,i){if(null!=this.formats()[r]||a.query(r,a.Scope.ATTRIBUTE)){this.isolate(t,n).format(r,i)}else e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.optimize=function(){e.prototype.optimize.call(this);var n=this.formats();if(0===Object.keys(n).length)return this.unwrap();var i=this.next;i instanceof t&&i.prev===this&&r(n,i.formats())&&(i.moveChildren(this),i.remove())},t}(o.default);s.blotName="inline",s.scope=a.Scope.INLINE_BLOT,s.tagName="SPAN",t.default=s},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),o=n(1),a={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},s=function(e){function t(t){var n=e.call(this,t)||this;return n.parent=null,n.observer=new MutationObserver(function(e){n.update(e)}),n.observer.observe(n.domNode,a),n}return r(t,e),t.prototype.detach=function(){e.prototype.detach.call(this),this.observer.disconnect()},t.prototype.deleteAt=function(t,n){this.update(),0===t&&n===this.length()?this.children.forEach(function(e){e.remove()}):e.prototype.deleteAt.call(this,t,n)},t.prototype.formatAt=function(t,n,r,i){this.update(),e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.insertAt=function(t,n,r){this.update(),e.prototype.insertAt.call(this,t,n,r)},t.prototype.optimize=function(t){var n=this;void 0===t&&(t=[]),e.prototype.optimize.call(this);for(var r=[].slice.call(this.observer.takeRecords());r.length>0;)t.push(r.pop());for(var a=function(e,t){void 0===t&&(t=!0),null!=e&&e!==n&&null!=e.domNode.parentNode&&(null==e.domNode[o.DATA_KEY].mutations&&(e.domNode[o.DATA_KEY].mutations=[]),t&&a(e.parent))},s=function(e){null!=e.domNode[o.DATA_KEY]&&null!=e.domNode[o.DATA_KEY].mutations&&(e instanceof i.default&&e.children.forEach(s),e.optimize())},l=t,c=0;l.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(function(e){var t=o.find(e.target,!0);null!=t&&(t.domNode===e.target&&("childList"===e.type?(a(o.find(e.previousSibling,!1)),[].forEach.call(e.addedNodes,function(e){var t=o.find(e,!1);a(t,!1),t instanceof i.default&&t.children.forEach(function(e){a(e,!1)})})):"attributes"===e.type&&a(t.prev)),a(t))}),this.children.forEach(s),l=[].slice.call(this.observer.takeRecords()),r=l.slice();r.length>0;)t.push(r.pop())}},t.prototype.update=function(t){var n=this;t=t||this.observer.takeRecords(),t.map(function(e){var t=o.find(e.target,!0);if(null!=t)return null==t.domNode[o.DATA_KEY].mutations?(t.domNode[o.DATA_KEY].mutations=[e],t):(t.domNode[o.DATA_KEY].mutations.push(e),null)}).forEach(function(e){null!=e&&e!==n&&null!=e.domNode[o.DATA_KEY]&&e.update(e.domNode[o.DATA_KEY].mutations||[])}),null!=this.domNode[o.DATA_KEY].mutations&&e.prototype.update.call(this,this.domNode[o.DATA_KEY].mutations),this.optimize(t)},t}(i.default);s.blotName="scroll",s.defaultChild="block",s.scope=o.Scope.BLOCK_BLOT,s.tagName="DIV",t.default=s},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(23),o=n(1),a=function(e){function t(t){var n=e.call(this,t)||this;return n.text=n.statics.value(n.domNode),n}return r(t,e),t.create=function(e){return document.createTextNode(e)},t.value=function(e){var t=e.data;return t.normalize&&(t=t.normalize()),t},t.prototype.deleteAt=function(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)},t.prototype.index=function(e,t){return this.domNode===e?t:-1},t.prototype.insertAt=function(t,n,r){null==r?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):e.prototype.insertAt.call(this,t,n,r)},t.prototype.length=function(){return this.text.length},t.prototype.optimize=function(){e.prototype.optimize.call(this),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},t.prototype.position=function(e,t){return void 0===t&&(t=!1),[this.domNode,e]},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=o.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},t.prototype.update=function(e){var t=this;e.some(function(e){return"characterData"===e.type&&e.target===t.domNode})&&(this.text=this.statics.value(this.domNode))},t.prototype.value=function(){return this.text},t}(i.default);a.blotName="text",a.scope=o.Scope.INLINE_BLOT,t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.head=this.tail=void 0,this.length=0}return e.prototype.append=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.insertBefore(e[0],void 0),e.length>1&&this.append.apply(this,e.slice(1))},e.prototype.contains=function(e){for(var t,n=this.iterator();t=n();)if(t===e)return!0;return!1},e.prototype.insertBefore=function(e,t){e.next=t,null!=t?(e.prev=t.prev,null!=t.prev&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):null!=this.tail?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=void 0,this.head=this.tail=e),this.length+=1},e.prototype.offset=function(e){for(var t=0,n=this.head;null!=n;){if(n===e)return t;t+=n.length(),n=n.next}return-1},e.prototype.remove=function(e){this.contains(e)&&(null!=e.prev&&(e.prev.next=e.next),null!=e.next&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)},e.prototype.iterator=function(e){return void 0===e&&(e=this.head),function(){var t=e;return null!=e&&(e=e.next),t}},e.prototype.find=function(e,t){void 0===t&&(t=!1);for(var n,r=this.iterator();n=r();){var i=n.length();if(e<i||t&&e===i&&(null==n.next||0!==n.next.length()))return[n,e];e-=i}return[null,0]},e.prototype.forEach=function(e){for(var t,n=this.iterator();t=n();)e(t)},e.prototype.forEachAt=function(e,t,n){if(!(t<=0))for(var r,i=this.find(e),o=i[0],a=i[1],s=e-a,l=this.iterator(o);(r=l())&&s<e+t;){var c=r.length();e>s?n(r,e-s,Math.min(t,s+c-e)):n(r,0,Math.min(c,e+t-s)),s+=c}},e.prototype.map=function(e){return this.reduce(function(t,n){return t.push(e(n)),t},[])},e.prototype.reduce=function(e,t){for(var n,r=this.iterator();n=r();)t=e(t,n);return t},e}();t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(29),o=r(i),a=n(36),s=n(38),l=n(67),c=n(64),u=r(c),d=n(65),p=r(d),f=n(69),h=r(f),m=n(37),g=n(26),v=n(39),_=n(40),b=n(45),y=r(b),w=n(68),E=r(w),k=n(27),x=r(k),S=n(70),C=r(S),M=n(71),A=r(M),O=n(72),T=r(O),N=n(66),L=r(N),I=n(73),P=r(I),R=n(16),D=r(R),V=n(74),B=r(V),F=n(75),j=r(F),W=n(47),U=r(W),q=n(41),H=r(q),z=n(28),Y=r(z),G=n(48),K=r(G),X=n(49),Z=r(X),Q=n(50),$=r(Q),J=n(76),ee=r(J),te=n(63),ne=r(te);o.default.register({"attributors/attribute/direction":s.DirectionAttribute,"attributors/class/align":a.AlignClass,"attributors/class/background":m.BackgroundClass,"attributors/class/color":g.ColorClass,"attributors/class/direction":s.DirectionClass,"attributors/class/font":v.FontClass,"attributors/class/size":_.SizeClass,"attributors/style/align":a.AlignStyle,"attributors/style/background":m.BackgroundStyle,"attributors/style/color":g.ColorStyle,"attributors/style/direction":s.DirectionStyle,"attributors/style/font":v.FontStyle,"attributors/style/size":_.SizeStyle},!0),o.default.register({"formats/align":a.AlignClass,"formats/direction":s.DirectionClass,"formats/indent":l.IndentClass,"formats/background":m.BackgroundStyle,"formats/color":g.ColorStyle,"formats/font":v.FontClass,"formats/size":_.SizeClass,"formats/blockquote":u.default,"formats/code-block":D.default,"formats/header":p.default,"formats/list":h.default,"formats/bold":y.default,"formats/code":R.Code,"formats/italic":E.default,"formats/link":x.default,"formats/script":C.default,"formats/strike":A.default,"formats/underline":T.default,"formats/image":L.default,"formats/video":P.default,"formats/list/item":f.ListItem,"modules/formula":B.default,"modules/syntax":j.default,"modules/toolbar":U.default,"themes/bubble":ee.default,"themes/snow":ne.default,"ui/icons":H.default,"ui/picker":Y.default,"ui/icon-picker":Z.default,"ui/color-picker":K.default,"ui/tooltip":$.default},!0),e.exports=o.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(3),d=r(u),p=n(5),f=r(p),h=n(43),m=r(h),g=n(27),v=r(g),_=n(15),b=n(41),y=r(b),w=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],E=function(e){function t(e,n){i(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=w);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.container.classList.add("ql-snow"),r}return a(t,e),c(t,[{key:"extendToolbar",value:function(e){e.container.classList.add("ql-snow"),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),y.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),y.default),this.tooltip=new k(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(t,n){e.handlers.link.call(e,!n.format.link)})}}]),t}(m.default);E.DEFAULTS=(0,d.default)(!0,{},m.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){if(e){var t=this.quill.getSelection();if(null==t||0==t.length)return;var n=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n);this.quill.theme.tooltip.edit("link",n)}else this.quill.format("link",!1)}}}}});var k=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.preview=r.root.querySelector("a.ql-preview"),r}return a(t,e),c(t,[{key:"listen",value:function(){var e=this;l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(t){e.root.classList.contains("ql-editing")?e.save():e.edit("link",e.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(t){if(null!=e.linkRange){var n=e.linkRange;e.restoreFocus(),e.quill.formatText(n,"link",!1,f.default.sources.USER),delete e.linkRange}t.preventDefault(),e.hide()}),this.quill.on(f.default.events.SELECTION_CHANGE,function(t,n,r){if(null!=t){if(0===t.length&&r===f.default.sources.USER){var i=e.quill.scroll.descendant(v.default,t.index),o=s(i,2),a=o[0],l=o[1];if(null!=a){e.linkRange=new _.Range(t.index-l,a.length());var c=v.default.formats(a.domNode);return e.preview.textContent=c,e.preview.setAttribute("href",c),e.show(),void e.position(e.quill.getBounds(e.linkRange))}}else delete e.linkRange;e.hide()}})}},{key:"show",value:function(){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),t}(h.BaseTooltip);k.TEMPLATE=['<a class="ql-preview" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),t.default=E},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(4),s=function(e){return e&&e.__esModule?e:{default:e}}(a),l=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),t}(s.default);l.blotName="blockquote",l.tagName="blockquote",t.default=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(4),l=function(e){return e&&e.__esModule?e:{default:e}}(s),c=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),a(t,null,[{key:"formats",value:function(e){return this.tagName.indexOf(e.tagName)+1}}]),t}(l.default);c.blotName="header",c.tagName=["H1","H2","H3","H4","H5","H6"],t.default=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},l=n(7),c=function(e){return e&&e.__esModule?e:{default:e}}(l),u=n(27),d=["alt","height","width"],p=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),a(t,[{key:"format",value:function(e,n){d.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=s(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return d.reduce(function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t},{})}},{key:"match",value:function(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}},{key:"sanitize",value:function(e){return(0,u.sanitize)(e,["http","https","data"])?e:"//:0"}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(c.default);p.blotName="image",p.tagName="IMG",t.default=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.IndentClass=void 0;var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},l=n(0),c=function(e){return e&&e.__esModule?e:{default:e}}(l),u=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),a(t,[{key:"add",value:function(e,n){if("+1"===n||"-1"===n){var r=this.value(e)||0;n="+1"===n?r+1:r-1}return 0===n?(this.remove(e),!0):s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"add",this).call(this,e,n)}},{key:"canAdd",value:function(e,n){return s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,n)||s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,parseInt(n))}},{key:"value",value:function(e){return parseInt(s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e))||void 0}}]),t}(c.default.Attributor.Class),d=new u("indent","ql-indent",{scope:c.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});t.IndentClass=d},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(45),s=function(e){return e&&e.__esModule?e:{default:e}}(a),l=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),t}(s.default);l.blotName="italic",l.tagName=["EM","I"],t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ListItem=void 0;var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},u=n(0),d=r(u),p=n(4),f=r(p),h=n(24),m=r(h),g=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),l(t,[{key:"format",value:function(e,n){e!==v.blotName||n?c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n):this.replaceWith(d.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(e,n){return this.parent.isolate(this.offset(this.parent),this.length()),e===this.parent.statics.blotName?(this.parent.replaceWith(e,n),this):(this.parent.unwrap(),c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e,n))}}],[{key:"formats",value:function(e){return e.tagName===this.tagName?void 0:c(t.__proto__||Object.getPrototypeOf(t),"formats",this).call(this,e)}}]),t}(f.default);g.blotName="list-item",g.tagName="LI";var v=function(e){function t(e){o(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return e.addEventListener("click",function(t){if(t.target.parentNode===e){var r=n.statics.formats(e),i=d.default.find(t.target);"checked"===r?i.format("list","unchecked"):"unchecked"===r&&i.format("list","checked")}}),n}return s(t,e),l(t,null,[{key:"create",value:function(e){var n="ordered"===e?"OL":"UL",r=c(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,n);return"checked"!==e&&"unchecked"!==e||r.setAttribute("data-checked","checked"===e),r}},{key:"formats",value:function(e){return"OL"===e.tagName?"ordered":"UL"===e.tagName?e.hasAttribute("data-checked")?"true"===e.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),l(t,[{key:"format",value:function(e,t){this.children.length>0&&this.children.tail.format(e,t)}},{key:"formats",value:function(){return i({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(e,n){if(e instanceof g)c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n);else{var r=null==n?this.length():n.offset(this),i=this.split(r);i.parent.insertBefore(e,i)}}},{key:"optimize",value:function(){c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this);var e=this.next;null!=e&&e.prev===this&&e.statics.blotName===this.statics.blotName&&e.domNode.tagName===this.domNode.tagName&&e.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(e.moveChildren(this),e.remove())}},{key:"replace",value:function(e){if(e.statics.blotName!==this.statics.blotName){var n=d.default.create(this.statics.defaultChild);e.moveChildren(n),this.appendChild(n)}c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e)}}]),t}(m.default);v.blotName="list",v.scope=d.default.Scope.BLOCK_BLOT,v.tagName=["OL","UL"],v.defaultChild="list-item",v.allowedChildren=[g],t.ListItem=g,t.default=v},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},l=n(8),c=function(e){return e&&e.__esModule?e:{default:e}}(l),u=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),a(t,null,[{key:"create",value:function(e){return"super"===e?document.createElement("sup"):"sub"===e?document.createElement("sub"):s(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e)}},{key:"formats",value:function(e){return"SUB"===e.tagName?"sub":"SUP"===e.tagName?"super":void 0}}]),t}(c.default);u.blotName="script",u.tagName=["SUB","SUP"],t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),s=function(e){return e&&e.__esModule?e:{default:e}}(a),l=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),t}(s.default);l.blotName="strike",l.tagName="S",t.default=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),s=function(e){return e&&e.__esModule?e:{default:e}}(a),l=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),t}(s.default);l.blotName="underline",l.tagName="U",t.default=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},l=n(4),c=n(27),u=function(e){return e&&e.__esModule?e:{default:e}}(c),d=["height","width"],p=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),a(t,[{key:"format",value:function(e,n){d.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=s(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return d.reduce(function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t},{})}},{key:"sanitize",value:function(e){return u.default.sanitize(e)}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(l.BlockEmbed);p.blotName="video",p.className="ql-video",p.tagName="IFRAME",t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FormulaBlot=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(7),u=r(c),d=n(6),p=r(d),f=n(9),h=r(f),m=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"index",value:function(){return 1}}],[{key:"create",value:function(e){var n=l(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&(window.katex.render(e,n),n.setAttribute("data-value",e)),n.setAttribute("contenteditable",!1),n}},{key:"value",value:function(e){return e.getAttribute("data-value")}}]),t}(u.default);m.blotName="formula",m.className="ql-formula",m.tagName="SPAN";var g=function(e){function t(){i(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return e}return a(t,e),s(t,null,[{key:"register",value:function(){p.default.register(m,!0)}}]),t}(h.default);t.FormulaBlot=m,t.default=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CodeToken=t.CodeBlock=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},c=n(0),u=r(c),d=n(6),p=r(d),f=n(9),h=r(f),m=n(16),g=r(m),v=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"replaceWith",value:function(e){this.domNode.textContent=this.domNode.textContent,this.attach(),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e)}},{key:"highlight",value:function(e){if(this.cachedHTML!==this.domNode.innerHTML){var t=this.domNode.textContent;(t.trim().length>0||null==this.cachedHTML)&&(this.domNode.innerHTML=e(t),this.attach()),this.cachedHTML=this.domNode.innerHTML}}}]),t}(g.default);v.className="ql-syntax";var _=new u.default.Attributor.Class("token","hljs",{scope:u.default.Scope.INLINE}),b=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if("function"!=typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var a=null;return r.quill.on(p.default.events.SCROLL_OPTIMIZE,function(){null==a&&(a=setTimeout(function(){r.highlight(),a=null},100))}),r.highlight(),r}return a(t,e),s(t,null,[{key:"register",value:function(){p.default.register(_,!0),p.default.register(v,!0)}}]),s(t,[{key:"highlight",value:function(){var e=this;if(!this.quill.selection.composing){var t=this.quill.getSelection();this.quill.scroll.descendants(v).forEach(function(t){t.highlight(e.options.highlight)}),this.quill.update(p.default.sources.SILENT),null!=t&&this.quill.setSelection(t,p.default.sources.SILENT)}}}]),t}(h.default);b.DEFAULTS={highlight:function(){return null==window.hljs?null:function(e){return window.hljs.highlightAuto(e).value}}()},t.CodeBlock=v,t.CodeToken=_,t.default=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BubbleTooltip=void 0;var s=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(3),u=r(c),d=n(5),p=r(d),f=n(43),h=r(f),m=n(15),g=n(41),v=r(g),_=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],b=function(e){function t(e,n){i(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=_);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.container.classList.add("ql-bubble"),r}return a(t,e),l(t,[{key:"extendToolbar",value:function(e){this.tooltip=new y(this.quill,this.options.bounds),this.tooltip.root.appendChild(e.container),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),v.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),v.default)}}]),t}(h.default);b.DEFAULTS=(0,u.default)(!0,{},h.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var y=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.on(p.default.events.EDITOR_CHANGE,function(e,t,n,i){if(e===p.default.events.SELECTION_CHANGE)if(null!=t&&t.length>0&&i===p.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var o=r.quill.getLines(t.index,t.length);if(1===o.length)r.position(r.quill.getBounds(t));else{var a=o[o.length-1],s=r.quill.getIndex(a),l=Math.min(a.length()-1,t.index+t.length-s),c=r.quill.getBounds(new m.Range(s,l));r.position(c)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()}),r}return a(t,e),l(t,[{key:"listen",value:function(){var e=this;s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){e.root.classList.remove("ql-editing")}),this.quill.on(p.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!e.root.classList.contains("ql-hidden")){var t=e.quill.getSelection();null!=t&&e.position(e.quill.getBounds(t))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(e){var n=s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"position",this).call(this,e),r=this.root.querySelector(".ql-tooltip-arrow");if(r.style.marginLeft="",0===n)return n;r.style.marginLeft=-1*n-r.offsetWidth/2+"px"}}]),t}(f.BaseTooltip);y.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),t.BubbleTooltip=y,t.default=b},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(e,t){e.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=3 y1=4 y2=14></line> <line class=ql-stroke x1=11 x2=11 y1=4 y2=14></line> <line class=ql-stroke x1=11 x2=3 y1=9 y2=9></line> <path class="ql-stroke ql-thin" d=M15.5,14.5h-2c0-.234,1.85-1.076,1.85-2.234a0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=3 y1=4 y2=14></line> <line class=ql-stroke x1=11 x2=11 y1=4 y2=14></line> <line class=ql-stroke x1=11 x2=3 y1=9 y2=9></line> <line class="ql-stroke ql-thin" x1=13.5 x2=15.5 y1=14.5 y2=14.5></line> <path class=ql-fill d=M14.5,15a0.5,0.5,0,0,1-.5-0.5V12.085l-0.276.138A0.5,0.5,0,0,1,13.053,12c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,15,11.5v3A0.5,0.5,0,0,1,14.5,15Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(e,t){e.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){e.exports=n(62)}])})}).call(t,n(4).Buffer)},1473:function(e,t,n){"use strict";function r(e,t){return window.getComputedStyle(e)[t]}function i(e,t,n){return"number"==typeof n&&(n=n.toString()+"px"),e.style[t]=n,e}function o(e,t){for(var n in t){var r=t[n];"number"==typeof r&&(r=r.toString()+"px"),e.style[n]=r}return e}var a={};a.create=function(e,t){var n=document.createElement(e);return n.className=t,n},a.appendTo=function(e,t){return t.appendChild(e),e},a.css=function(e,t,n){return"object"==typeof t?o(e,t):void 0===n?r(e,t):i(e,t,n)},a.matches=function(e,t){return void 0!==e.matches?e.matches(t):e.msMatchesSelector(t)},a.remove=function(e){void 0!==e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)},a.queryChildren=function(e,t){return Array.prototype.filter.call(e.childNodes,function(e){return a.matches(e,t)})},e.exports=a},1474:function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<t.length;i++){var a=t[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},1475:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(23),a=n(14),s=n(7),l=n(122),c=n(1484),u=n(3),d=n(1508),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._subs=[],t._outOfTarget=function(e){return function(t){return!u.DOM.Rect.hasPoint(t.getBoundingClientRect(),e)}},t}return r.__extends(t,e),t.prototype.componentDidMount=function(){this._listenTooltipAppearance()},t.prototype.componentWillUnmount=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[],this.context.tooltip.hide()},t.prototype.render=function(){return i.createElement(s.F.div,{role:"tooltip"},this.context.tooltip.state.view(this.props.children))},t.prototype._listenTooltipAppearance=function(){var e=this,t=o.Observable.fromEvent(document,"keydown").filter(function(e){return e.keyCode===c.ESC_CODE}),n=o.Observable.fromEvent(document,"mousedown").withLatestFrom(this.context.tooltip.state).filter(function(t){var n=t[0];return t[1].map(function(e){return e.target}).filter(function(){return u.DOM.isDisabled(n.target)}).forAll(e._outOfTarget({x:n.clientX,y:n.clientY}))}),r=o.Observable.merge(t,n,o.Observable.fromEvent(document,"scroll"),o.Observable.fromEvent(window,"scrollaction").filter(function(e){return"show"===e.detail})).mapTo(u.RxUtils.voidValue).share();this._subs=[this.context.tooltip.hasContent.filter(Boolean).switchMapTo(r.first()).subscribe(this.context.tooltip.hide),this.context.tooltip.hasContent.filter(Boolean).switchMapTo(o.Observable.merge(u.RxUtils.delay(!0,500),r.mapTo(!1)).first()).filter(Boolean).subscribe(this.context.tooltip.show)]},t}(l.BaseComponent);t.BaseTooltip=p;var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype._alignmentToClassMapper=function(e){switch(e){case"top":return d.top;case"right":return d.right;case"auto":case"center":case"bottom":case"left":case"topCenter":case"topLeft":case"topRight":case"bottomCenter":case"bottomRight":case"bottomLeft":return"";default:return u.assertNever(e)}},t.prototype.render=function(){var e=this;return i.createElement(p,null,function(t){return i.createElement("div",r.__assign({ref:function(t){return e._el=t}},s.classes(d.tooltip,t.map(function(t){return e._alignmentToClassMapper(t.alignment)}).orNull()),{style:e._getTooltipStyle(t)}),t.map(function(e){return e.content}).orNull())})},t.prototype._getTooltipStyle=function(e){var t=a.Option.of(this._el&&this._el.offsetParent);return a.Option.map2(t,e,function(e,t){var n=t.target,r=t.alignment,i=n.getBoundingClientRect(),o=e.getBoundingClientRect();return{top:("top"===r?i.top-26:i.bottom)-o.top,left:i.left+i.width/2-o.left,opacity:1,visibility:"visible",transition:""}}).getOrElse({top:0,left:0,opacity:0,visibility:"none",transition:"none"})},t}(l.BaseComponent);t.TooltipElement=f},1476:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1477);t.DenaliEditor=r.DenaliEditor,t.Range=r.Range,t.Mark=r.Mark,t.MarkId=r.MarkId;var i=n(1524);t.DEd=i.DEd;var o=n(1658);t.DedComponent=o.DedComponent},1477:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=function(){function e(t,n,r){void 0===r&&(r=e.DEFAULT_TYPE),this.start=t,this.end=n,this.type=r}return e.prototype.widen=function(){return new e(this.start-1,this.end+1,this.type)},e.prototype.narrow=function(){return new e(this.start+1,this.end-1,this.type)},Object.defineProperty(e.prototype,"length",{get:function(){return this.end-this.start},enumerable:!0,configurable:!0}),e.prototype.copy=function(){return new e(this.start,this.end,this.type)},e.prototype.toString=function(){return"R("+this.start+"; "+this.end+")"},e.empty=new e(0,0),e}();t.Range=i,function(e){e.DEFAULT_TYPE="*",e.AlertIdDelimiter="|"}(i=t.Range||(t.Range={})),t.Range=i;!function(e){function t(e){return{id:e.id,action:i.create,range:e.range,classes:e.classes,order:e.order}}function n(e,t){return{id:e.id,action:i.update,range:e.range,classes:t,order:e.order}}function r(e,t){return void 0===t&&(t=o.full),{id:e.id,action:i.remove,range:e.range,removeType:t}}var i;!function(e){e.create="create",e.update="update",e.remove="remove"}(i=e.ActionType||(e.ActionType={}));var o;!function(e){e.full="full",e.byPartialMatch="byPartialMatch",e.partial="partial"}(o=e.RemoveType||(e.RemoveType={})),e.getCreateAction=t,e.getUpdateAction=n,e.getRemoveAction=r}(t.Mark||(t.Mark={}));var o=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.value=r,i}return r.__extends(t,e),t.prototype.toString=function(){return"WR("+this.start+"; "+this.end+"; "+this.value+")"},t.prototype.equals=function(e){return this.start===e.start&&this.value===e.value},t.prototype.hashCode=function(){return 1e3*this.start+this.end},t}(i);t.WordRange=o;var a;!function(e){e[e.click=0]="click",e[e.dblclick=1]="dblclick"}(a=t.ClickType||(t.ClickType={}));var s=function(){function e(e,t){void 0===t&&(t=1),this.range=e,this.type=t>1?a.dblclick:a.click}return e.prototype.equals=function(e){return this.range.equals(e.range)&&this.type===e.type},e.prototype.hashCode=function(){return 31*(31+this.range.hashCode())+this.type},e}();t.ClickedWord=s;!function(e){e.empty={top:0,bottom:0,left:0,right:0}}(t.ViewportPadding||(t.ViewportPadding={}))},1478:function(e,t){function n(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=p[r.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](r.parts[o]);for(;o<r.parts.length;o++)i.parts.push(l(r.parts[o],t))}else{for(var a=[],o=0;o<r.parts.length;o++)a.push(l(r.parts[o],t));p[r.id]={id:r.id,refs:1,parts:a}}}}function r(e){for(var t=[],n={},r=0;r<e.length;r++){var i=e[r],o=i[0],a=i[1],s=i[2],l=i[3],c={css:a,media:s,sourceMap:l};n[o]?n[o].parts.push(c):t.push(n[o]={id:o,parts:[c]})}return t}function i(e,t){var n=m(),r=_[_.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),_.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function o(e){e.parentNode.removeChild(e);var t=_.indexOf(e);t>=0&&_.splice(t,1)}function a(e){var t=document.createElement("style");return t.type="text/css",i(e,t),t}function s(e){var t=document.createElement("link");return t.rel="stylesheet",i(e,t),t}function l(e,t){var n,r,i;if(t.singleton){var l=v++;n=g||(g=a(t)),r=c.bind(null,n,l,!1),i=c.bind(null,n,l,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=s(t),r=d.bind(null,n),i=function(){o(n),n.href&&URL.revokeObjectURL(n.href)}):(n=a(t),r=u.bind(null,n),i=function(){o(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}function c(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=b(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function u(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function d(e,t){var n=t.css,r=t.sourceMap;r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var i=new Blob([n],{type:"text/css"}),o=e.href;e.href=URL.createObjectURL(i),o&&URL.revokeObjectURL(o)}var p={},f=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}},h=f(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),m=f(function(){return document.head||document.getElementsByTagName("head")[0]}),g=null,v=0,_=[];e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},void 0===t.singleton&&(t.singleton=h()),void 0===t.insertAt&&(t.insertAt="bottom");var i=r(e);return n(i,t),function(e){for(var o=[],a=0;a<i.length;a++){var s=i[a],l=p[s.id];l.refs--,o.push(l)}if(e){n(r(e),t)}for(var a=0;a<o.length;a++){var l=o[a];if(0===l.refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete p[l.id]}}}};var b=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},1479:function(e,t){function n(){return r}var r="";e.exports=function(e){return r+=e.toString()+"\n",n}},1480:function(e,t,n){"use strict";function r(e){return c.StringUtils.isBreakWordChar(e.charCodeAt(0))}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(23),a=n(14),s=n(6),l=n(1476),c=n(3),u=n(157),d=function(){function e(e,t){void 0===e&&(e=0),void 0===t&&(t=!1),this._textLength=e,this._verify=t}return e.prototype.pushChanges=function(e){if(u.Change.isReset(e))this._textLength=e.length;else if(u.Change.isDelta(e)){if(this._verify&&this._textLength!==e.prevLen)throw new Error("Incorrect textLength on insert. Expected: "+e.prevLen+", actual: "+this._textLength);this._textLength+=e.length}},Object.defineProperty(e.prototype,"textLength",{get:function(){return this._textLength},enumerable:!0,configurable:!0}),e}();t.TextLengthCalc=d;var p=function(e){function t(t,n,r,i){var o=e.call(this,t,n,r)||this;return o.rangeId=i,o}return i.__extends(t,e),t.prototype.toString=function(){return"R(#"+this.rangeId+": "+this.start+"; "+this.end+")"},t}(l.Range);t.RangeWithId=p;var f=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.alertId=o,a}return i.__extends(t,e),t.prototype.toString=function(){return"R(#"+this.alertId+";"+this.rangeId+": "+this.start+"; "+this.end+")"},t}(p);t.RangeWithIdAndAlertId=f,function(e){function t(e){return Boolean(e.alertId)}e.hasAlertId=t}(p=t.RangeWithId||(t.RangeWithId={})),t.RangeWithId=p;!function(e){var t=function(){function e(){}return e.prototype.registerRange=function(e,t,n){return n?new f(t.start,t.end,t.type,e,n):new p(t.start,t.end,t.type,e)},e.prototype.deregisterRange=function(e){return l.Range.empty},e}();e.RangeManagerMock=t,e.mock=new t}(t.RangeManager||(t.RangeManager={}));var h=function(e,t){var n=e.end-t.end;return 0===n?e.start-t.start:n},m=function(){function e(e){void 0===e&&(e=0);var t=this;this._verifyState=!1,this._log=s.Monitoring.Logging.getLogger("position_manager",s.Logging.LogLevel.INFO),this._ranges={},this._rangesArray=[],this._rangeChanged=new o.Subject,this._changes=new o.Subject,this.changes=this._changes,this.rangeChanged=this._rangeChanged,this._lenCalc=new d(e,this._verifyState),c.registerDebugHelper("positions",function(){t._log.info("PositionManager",t.toString()),t._verifyIsSorted()})}return e.prototype.pushChanges=function(e){var t=this;this._log.trace("PM Incoming: ",{changes:e,currentLen:this._lenCalc.textLength}),this._lenCalc.pushChanges(e);var n=!1,i=0,o=new Set;u.Change.isFlush(e)||(u.Change.isReset(e)?this._rangesArray.forEach(function(e){e.start=0,e.end=0,o.add(e.rangeId)}):e.delta.ops.forEach(function(e){if(e.retain)i+=e.retain;else if(e.insert){var a=i,s=c.ArrayUtils.lowerBound(t._rangesArray,function(e){return e.end<a}),l=e.insert;if(i+=l.length,s<t._rangesArray.length){n=!0;for(var u=l.charAt(l.length-1),d=l.charAt(0),p=s;p<t._rangesArray.length;++p){var f=t._rangesArray[p];f.start<a?f.end===a?r(d)||(o.add(f.rangeId),f.end+=l.length):(o.add(f.rangeId),f.end+=l.length):(f.start!==a||r(u)?f.start+=l.length:o.add(f.rangeId),f.end+=l.length)}}}else if(e.delete){var h=i,s=c.ArrayUtils.lowerBound(t._rangesArray,function(e){return e.end<h});if(s<t._rangesArray.length){n=!0;for(var m=h+e.delete,p=s;p<t._rangesArray.length;++p){var f=t._rangesArray[p];f.start,f.start<m?(o.add(f.rangeId),f.start<h?f.end=f.end-Math.min(e.delete,f.end-h):f.end<=m?(f.start=h,f.end=h):(f.start=h,f.end-=e.delete)):(f.start-=e.delete,f.end-=e.delete)}}}}),this._verifyState&&this._verifyIsSorted(),n&&this._changes.next(),o.size>0&&this._rangeChanged.next(Array.from(o).map(function(e){return t.getRange(e)})))},e.prototype.registerRange=function(e,t,n){if(void 0!==this._ranges[e])throw new Error("Range already registered "+e);this._log.trace("Registered range: "+e);var r=n?new f(t.start,t.end,t.type,e,n):new p(t.start,t.end,t.type,e);return this._ranges[e]=r,this._rangesArray.push(r),this._rangesArray.sort(h),r},e.prototype.getRange=function(e){var t=this._ranges[e];if(void 0===t)throw new Error("Range is not registered");return t},e.prototype.deregisterRange=function(e){this._log.trace("deregisterRange #"+e);var t=this._ranges[e];if(void 0===t)throw new Error("Range is not registered: "+e);this._verifyState&&this._verifyIsSorted(),delete this._ranges[e];try{for(var n=c.ArrayUtils.lowerBound(this._rangesArray,function(e){return e.end<t.end}),r=n;r<this._rangesArray.length&&this._rangesArray[r].rangeId!==e;)r++;return c.invariant(r<this._rangesArray.length&&this._rangesArray[r].rangeId===e,"Range should be present: "+e),this._rangesArray.splice(r,1),t}catch(t){throw this._log.error("Cannot deregister range "+e,this._rangesArray),t}},e.prototype.findById=function(e){return a.Option.of(this._ranges[e])},e.prototype.findByRange=function(e){for(var t=[],n=c.ArrayUtils.lowerBound(this._rangesArray,function(t){return t.end<e.end}),r=n;r<this._rangesArray.length&&this._rangesArray[r].end===e.end;)this._rangesArray[r].start===e.start&&t.push(this._rangesArray[r]),r++;return t},e.prototype.findIntersections=function(e){for(var t=[],n=c.ArrayUtils.lowerBound(this._rangesArray,function(t){return t.end<e.start}),r=n;r<this._rangesArray.length;){var i=this._rangesArray[r];i.end>e.start&&e.end>i.start&&t.push(this._rangesArray[r]),r++}return t},e.prototype.getTextLength=function(){return this._lenCalc.textLength},e.prototype._verifyIsSorted=function(){for(var e=1;e<this._rangesArray.length;++e)this._rangesArray[e-1].end>this._rangesArray[e].end&&(this._log.isEnabled(s.Logging.LogLevel.DEBUG)?this._log.error("Houston, we have a problem: Array is not sorted anymore @ "+e,this._rangesArray):this._log.error("Houston, we have a problem: Array is not sorted anymore"),this._rangesArray.sort(h))},e.prototype.toString=function(){return JSON.stringify(this,void 0,2)},e.prototype.toJSON=function(){return{textLength:this.getTextLength(),ranges:this._rangesArray}},e}();t.PositionManager=m},1481:function(e,t,n){"use strict";function r(e){var t=e.children,n=e.className;return o.createElement(a.F.div,i.__assign({},a.classes(p.modal,n),{onClick:d.ReactUtils.stopPropagation(d.noop)}),t)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(13),a=n(7),s=n(23),l=n(122),c=n(1489),u=n(1484),d=n(3),p=n(1575),f=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n._overlayIndex=t._index++,n._subs=[],n._visibilityState=a.Atom.create("hidden"),n}return i.__extends(t,e),t.prototype.componentDidMount=function(){var e=this;if(this._visibilityState.set(this.props.visible.get()?"visible":"hidden"),this._subs.push(this._visibilityState.map(function(e){return"visible"===e}).distinctUntilChanged().subscribe(function(t){return e.context.visibleOverlays.modify(function(n){var r=new Set(n);return t?r.add(e._overlayIndex):r.delete(e._overlayIndex),r})}),this.props.visible.skip(1).subscribe(function(t){var n=e.props.animate?"fadeOut":"hidden";e._visibilityState.set(t?"visible":n)})),!this.props.preventClose){var t=this.props.visible;this._subs.push(this._visibilityState.switchMap(function(e){return"visible"===e?s.Observable.fromEvent(document,"keydown"):s.Observable.empty()}).filter(function(e){return e.keyCode===u.ESC_CODE}).subscribe(function(){return t.set(!1)}))}},t.prototype.componentWillUnmount=function(){var e=this;this.context.visibleOverlays.modify(function(t){var n=new Set(t);return n.delete(e._overlayIndex),n}),this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},t.prototype.render=function(){var e=this;return o.createElement(a.F.div,{role:"overlay-wrapper"},this._visibilityState.view(function(t){switch(t){case"visible":case"fadeOut":return o.createElement(a.F.div,i.__assign({},a.classes(e.props.animate?e._getAnimatedTypeClass(t):e._getTypeClass(t)),{onClick:function(){return!e.props.preventClose&&e.props.visible.set(!1)},onTransitionEnd:function(){"fadeOut"===t&&e._visibilityState.set("hidden")}}),o.createElement(a.F.div,i.__assign({},a.classes(e.props.animate&&e._getContentClass(t))),o.createElement(c.ScrollBarY,{name:"modal",allowHover:!0,className:p.scroll},o.createElement(a.F.div,{className:e._getAlignmentClass()},e.props.children))));case"hidden":return null;default:return d.assertNever(t)}}))},t.prototype._getAlignmentClass=function(){switch(this.props.alignment){case"top-center":return p.wrapperTopCenter;case"bottom-right":return p.wrapperBottomRight;case"none":return"";case"center":default:return p.wrapperCenter}},t.prototype._getTypeClass=function(e){if("visible"!==e)return p.wrapperTransparent;switch(this.props.overlayType){case"light":return p.wrapperLight;case"transparent":return p.wrapperTransparent;case"dark":default:return p.wrapperDark}},t.prototype._getAnimatedTypeClass=function(e){var t="visible"===e;switch(this.props.overlayType){case"light":return d.Animation.rafSequence(t?[p.wrapperTransparent,p.wrapperLight]:[p.wrapperLight,p.wrapperTransparent],!0);case"transparent":return s.Observable.of(p.wrapperTransparent);case"dark":default:return d.Animation.rafSequence(t?[p.wrapperTransparent,p.wrapperDark]:[p.wrapperDark,p.wrapperTransparent],!0)}},t.prototype._getContentClass=function(e){var t=this.props.theme||p,n=t.contentFaded,r=t.content,i="visible"===e?[n,r]:[r,n];return d.Animation.rafSequence(i,!0)},t.defaultProps={visible:a.Atom.create(!0)},t._index=0,t}(l.BaseComponent);t.Overlay=f,t.Modal=r,function(e){e.Header=function(e){var t=e.children,n=e.className;return o.createElement(a.F.header,i.__assign({},a.classes(p.header,n)),t)},e.Body=function(e){var t=e.children,n=e.className;return o.createElement(a.F.div,i.__assign({},a.classes(p.body,n))," ",t," ")},e.Footer=function(e){var t=e.children,n=e.className;return o.createElement(a.F.div,i.__assign({},a.classes(p.footer,n))," ",t," ")}}(r=t.Modal||(t.Modal={}))},1483:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(14),a=n(23),s=n(122),l=n(7),c=n(3),u=n(75),d=n(1501),p=n(1573),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(d.AnimationWrapper),h=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n._uuid=c.StringUtils.alphanumeric(12),n._debug=n.context.appRouter.query.get("debug").contains("dropdown"),n._initialState=n._debug,n._hovered=l.Atom.create(n._initialState),n._hidden=l.Atom.create(!n._initialState),n._listPosState=l.Atom.create({}),n._subs=[],n.hovered=n._hovered.pairwise().switchMap(function(e){var t=e[0];return e[1]?a.Observable.timer(n.props.showDelay).mapTo(!0):t?a.Observable.timer(500).mapTo(!1):a.Observable.of(!1)}).merge(t._hoveredForce.map(function(e){return e.contains(n._uuid)})).distinctUntilChanged().do(function(e){return e&&t._hoveredForce.next(o.Some(n._uuid))}).do(function(e){return e&&n._hidden.set(!1)}).share().startWith(n._initialState),n}return r.__extends(t,e),t.prototype.getChildContext=function(){return{hovered:this._hovered}},t.prototype._getHAlign=function(e){switch(e){case"left":case"auto":return{left:"0"};case"right":return{right:"0"};case"center":return{right:"50%",marginRight:"-"+(this._dropdownEl?this._dropdownEl.offsetWidth:0)/2+"px"};default:return c.assertNever(e)}},t.prototype._getVAlign=function(e){switch(e){case"top":return{bottom:"100%"};case"bottom":case"auto":return{top:"100%"};default:return c.assertNever(e)}},t.prototype.calcDropdownPosition=function(){var e=this,t=this.props.align,n=this.props.vAlign;this._listPosState.set(r.__assign({},this._getHAlign(t),this._getVAlign(n)));var i="auto"===t,o="auto"===n;(i||o)&&requestAnimationFrame(function(){if(e._dropdownEl){var a=document.body.getBoundingClientRect(),s=e._dropdownEl.getBoundingClientRect();e._listPosState.set(r.__assign({},e._getHAlign(i?a.right<s.right?"right":"left":t),e._getVAlign(o?a.bottom<s.bottom?"top":"bottom":n)))}})},t.prototype.componentDidMount=function(){var e=this;this._subs.push(this.hovered.subscribe(function(t){t&&e.calcDropdownPosition(),e.props.onVisibilityChange&&e.props.onVisibilityChange(t)}))},t.prototype.componentWillUnmount=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},t.prototype.componentWillReciveProps=function(){this.calcDropdownPosition()},t.prototype.mapStateToClass=function(e,t){var n={start:"",end:""};return t?{prev:n,next:{start:p.transparent,end:""}}:{prev:{start:"",end:p.transparent},next:n}},t.prototype.render=function(){var e=this,n=this.props,a=n.label,s=n.theme,u=void 0===s?{}:s;return i.createElement("div",r.__assign({},l.classes(p.wrapper,u.dropdownContainer),{onMouseEnter:function(){return e._hovered.set(!0)},onMouseLeave:function(){return e._hovered.set(e._initialState)},onClickCapture:function(n){var r=n.target;if(!c.DOM.isDisabled(r)){var i=!c.DOM.hasParentWithClassName(r,p.list);t._hoveredForce.next(i?o.Some(e._uuid):o.None),e._hovered.set(i)}}}),a,i.createElement(f,{state:this.hovered,stateToClassMapper:this.mapStateToClass},function(t){return t.state?i.createElement(m,r.__assign({key:"list",name:e.props.name,onTransitionEnd:"prev"===t.type?function(){return e._hidden.set(!0)}:c.noop},l.classes(u.dropdownList,t.view,e._hidden.view(function(e){return e?p.hidden:""})),{mount:function(t){return e._dropdownEl=t},style:e._listPosState}),e.props.children):null}))},t.defaultProps={align:"auto",vAlign:"auto",showDelay:500},t.childContextTypes=u.ElementState.HoveredContextTypes,t.Delimiter=function(){return i.createElement("div",{className:p.delimiter})},t._hoveredForce=new a.Subject,t}(s.BaseComponent);t.Dropdown=h;var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.getChildContext=function(){return u.ElementState.emptyWithName("dropdown-"+this.props.name)},t.prototype.render=function(){return i.createElement(l.F.div,r.__assign({},l.classes(this.props.className,p.list),{style:this.props.style,mount:this.props.mount,role:"dropdown-list","data-name":"dropdown-"+this.props.name,onTransitionEnd:this.props.onTransitionEnd}),this.props.children)},t.childContextTypes=u.ElementState.contextTypes,t}(i.Component);t.DropdownList=m},1484:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ESC_CODE=27},1485:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(24),a=n(14),s=n(23),l=n(7),c=n(122),u=n(1541),d=n(1481),p=n(3),f=n(1517);t.Spot=function(e){var t=e.className,n=e.onClick,o=e.customStyle;return i.createElement(l.F.div,r.__assign({},l.classes(f.pulseWrapper,t),{style:o,onClick:function(){return n&&n()}}),i.createElement("div",{className:f.pulse}))};var h=function(e){function n(t,n){var r=e.call(this,t)||this;return r._onboardingStepSubscription=a.None,r._subs=[],r._wrapperHtmlElement=null,r._containerElement=null,r._visibilityState=l.Atom.create(!r.props.findFirstButton),r._spotStyle=l.Atom.create({}),r._notificationStyle=l.Atom.create({}),r._triangleCustomStyle=l.Atom.create({}),r._onEventActionTaken=function(e,t){return void 0===t&&(t=!0),function(n){var i=e.state.get();if("popup"===i||t&&"dot"===i){var o=n.target;if(p.DOM.isDisabled(o))return;var a=t||p.DOM.hasParentWithClassName(o,f.containerDiv);if(r.props.findFirstButton&&!p.DOM.hasParentWithAttribute(o,"role","button"))return;a&&e.actionTaken()}else"dot"===i&&(n.preventDefault(),n.stopPropagation())}},r._onboardingViewModel=t.onboardingViewModel||n.onboardingViewModel,p.invariant(Boolean(r._onboardingViewModel),"onboardingViewModel should be set either in context or in props"),r}return r.__extends(n,e),n.prototype.getChildContext=function(){return{onboardingViewModel:this._onboardingViewModel}},n.prototype.componentWillMount=function(){this._onboardingViewModel.isStepEnabled(this.props.stepId)&&(this._onboardingStepSubscription=a.Some(this._onboardingViewModel.subscribeForStep(this.props.stepId)))},n.prototype.componentWillUnmount=function(){this._onboardingStepSubscription.forEach(function(e){return"popup"===e.state.get()&&e.popupIgnored()}),this._subs.forEach(function(e){return e.unsubscribe()})},n.prototype.componentDidMount=function(){var e=this;if(this.props.findFirstButton&&!this._onboardingStepSubscription.isEmpty()){var t=this.props.findFirstButton.dotPosition,n=this.props.findFirstButton.notificationPosition||"normal",r=this.props.findFirstButton.buttonOrder;this._subs.push(this.context.screen.remSize.merge(this._onboardingStepSubscription.get().state.filter(function(e){return"dot"===e||"popup"===e})).switchMapTo("object"!=typeof r?l.Atom.create(r):r).subscribe(function(r){return setTimeout(function(){var i=e._containerElement&&e._containerElement.querySelectorAll('[role="button"]'),o=i&&i.length>0&&(void 0===r?i[i.length-1]:i[r]);if(o&&e._wrapperHtmlElement){var a=o.getBoundingClientRect(),s=e._wrapperHtmlElement.getBoundingClientRect();switch(t){case"rightTop":e._spotStyle.set({top:0,left:a.left-s.left+a.width});break;case"center":e._spotStyle.set({top:a.top-s.top+a.height/2,left:a.left-s.left+a.width/2});break;default:p.assertNever(t)}switch(n){case"normal":e._triangleCustomStyle.set({left:a.left-s.left+a.width/2+3});break;case"underButton":e._triangleCustomStyle.set({right:a.left-s.left+a.width/2}),e._notificationStyle.set({top:a.top-s.top+a.height});break;default:p.assertNever(n)}e._visibilityState.set(!0)}},500)}))}},n.prototype.render=function(){var e=this;return this._onboardingStepSubscription.fold(function(){return i.Children.only(e.props.children)},function(n){return i.createElement(l.F.div,r.__assign({key:"onboarding-wrapper"},l.classes(f.containerWrapper,e.props.themes&&e.props.themes.containerWrapperClassName),{mount:function(t){return e._wrapperHtmlElement=t}}),i.createElement("div",r.__assign({key:"container",ref:function(t){return e._containerElement=t}},l.classes(f.containerDiv,e.props.themes&&e.props.themes.containerClassName),{onClickCapture:e._onEventActionTaken(n,"onclick"===e.props.eventType),onMouseEnter:function(t){return"onhover"===e.props.eventType&&e._onEventActionTaken(n,!1)(t)}}),e.props.children),l.Atom.combine(n.state,e._visibilityState,function(o,a){if(!a)return null;switch(o){case"dot":var s=e.props.themes&&e.props.themes.spotClassName;return i.createElement(t.Spot,r.__assign({customStyle:e._spotStyle,key:"spot"},l.classes(f.onboardingSpot,s),{onClick:function(){return n.dotClicked()}}));case"popup":var c=e.props.themes&&e.props.themes.notificationClassName;return i.createElement(u.OnboardingNotification,{key:"step",title:e.props.title,alignment:e.props.alignment||"left",themes:{className:c,triangleClassName:e.props.themes?e.props.themes.triangleClassName:void 0},onClose:function(){return n.popupClosed()},triangleCustomStyle:e._triangleCustomStyle,customStyle:e._notificationStyle,description:e.props.message});default:return null}}))})},n.contextTypes=r.__assign({},c.BaseComponent.contextTypes,{onboardingViewModel:o.object}),n.childContextTypes=n.contextTypes,n}(c.BaseComponent);t.Onboarding=h;var m=function(e){function t(t,n){var i=e.call(this,t)||this;return i._customStyles=l.Atom.create({display:"none",pointerEvents:"none"}),i._subs=[],i._onboardingStepSubscription=a.None,i._isDotOrPopupState=function(e){return"dot"===e||"popup"===e},i._visibilityOverlay=l.Atom.create(!1),i._updatePosition=function(e,t){return requestAnimationFrame(function(){i.props.denaliEditorModel.flushChanges(),a.Try.of(function(){return t.map(function(e){return e.firstClientRect})}).toOption().flatMap(function(e){return e}).fold(function(){return i._customStyles.set({display:"none"})},function(t){var n=t.top,o=t.left,a=t.width,s=t.height;i._customStyles.modify(function(t){return r.__assign({},t,{position:"absolute",left:o/e+"rem",top:n/e+"rem",width:a/e+"rem",height:s/e+"rem",display:"block"})})})})},i._onboardingViewModel=t.onboardingViewModel||n.onboardingViewModel,p.invariant(Boolean(i._onboardingViewModel),"onboardingViewModel should be set either in context or in props"),i}return r.__extends(t,e),t.prototype.componentWillMount=function(){var e=this;if(this._onboardingViewModel.isStepEnabled(this.props.stepId)){this._onboardingStepSubscription=a.Some(this._onboardingViewModel.subscribeForStep(this.props.stepId));var t=l.Atom.create(a.None);this._subs.push(this._onboardingStepSubscription.fold(function(){return s.Observable.empty()},function(e){return e.state}).filter(this._isDotOrPopupState).first().switchMap(function(){return e.props.marksVM.getFirstMark()}).subscribe(function(e){return t.set(e)}),this._onboardingStepSubscription.fold(function(){return s.Observable.empty()},function(e){return e.state}).do(function(t){"popup"===t&&e._visibilityOverlay.set(!0),e._customStyles.modify(function(e){return r.__assign({},e,{pointerEvents:"dot"===t?"all":"none"})})}).merge(this.props.denaliEditorModel.contentUpdated).merge(this.props.viewport).combineLatest(this.context.screen.remSize,t.skip(1)).subscribe(function(t){var n=(t[0],t[1]),r=t[2];return e._updatePosition(n,r)}),this._visibilityOverlay.skip(1).filter(function(e){return!e}).subscribe(function(){return e._onboardingViewModel.step2Taken()}))}},t.prototype.componentWillUnmount=function(){this._subs.forEach(function(e){return e.unsubscribe()})},t.prototype.render=function(){return!this._onboardingStepSubscription.isEmpty()&&i.createElement("div",{className:f.editor},i.createElement(d.Overlay,{visible:this._visibilityOverlay,alignment:"none",overlayType:"transparent"}),i.createElement(l.F.div,{style:this._customStyles,className:f.onboardingPopup},i.createElement(h,r.__assign({},this.props,{eventType:"none"}),i.createElement(l.F.div,{style:this._customStyles.view(function(e){return{width:e.width,height:e.height}})}))))},t.contextTypes=r.__assign({},c.BaseComponent.contextTypes,{onboardingViewModel:o.object}),t.childContextTypes=h.contextTypes,t}(c.BaseComponent);t.EditorOnboarding=m},1486:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(3),o=n(23),a=n(14),s=n(7),l=n(1464),c=n(1565),u=n(6),d=n(23),p=n(123),f=n(1463),h=n(1465),m=n(213),g=n(1497);!function(e){e.isForceSidebar=function(e){return(h.LensState.isLensview(e)||e.currentLens.type===h.LensViewType.plagiarism)&&e.alertSource===h.ForceAlertActionSource.forceSidebar},e.isOpened=function(e){return!h.LensState.is(l.Lens.SpecialId.Closed)(e)}}(r=t.PageViewModel||(t.PageViewModel={}));var v=function(){function e(e,t,n,c,f,m,g,v,_){var b=this;this._sidebarVM=e,this._lensStateVM=t,this._alignmentVM=n,this._alertList=c,this._ded=f,this._documentModel=m,this._features=g,this._context=v,this._settingsModel=_,this._log=u.Monitoring.Logging.getLogger("PageViewModelImpl"),this._stateChangeCounter=u.Monitoring.TimeSeries.root.getCounter("pagevm.state"),this._subs=[],this._filter=s.Atom.create("free"),this.state=this._lensStateVM.state,this._textProcessingLoader=this._features.denali.openOnPasteAndUploadMode.contains(p.DenaliFeatures.OpenOnPasteOrUploadMode.tripleLoader),this._isTextProcessing=this._features.denali.openOnPasteAndUploadMode.nonEmpty(),this._openSidebar=this._context.openSidebar,this.focusedCard=this.state.view(h.LensState.getActiveCard),this.focusedAlert=this.state.view(h.LensState.getActiveAlert),this.filterKit=s.Atom.create(a.None),this.sidebarOpened=this.state.view(r.isOpened),this.textInProcessing=s.Atom.create(this._textProcessingLoader&&this._openSidebar),this.openedAfterPaste=new d.Subject,this._alertsFilter=function(e){switch(e){case"free":return a.Some(function(e){return e.alertType===l.Lens.Type.Critical});case"all":return a.Some(function(e){return!e.hasLongHighlight});default:return i.assertNever(e),a.None}};var y=this._features.denali,w=i.RxUtils.createRetrySubscriber(this._log);this._subs.push(w("_ensureAlertsFilter",this._ensureAlertsFilter()),w("_listenAlertsUndoables",this._listenAlertsUndoables()),w("_listenCheckingState",this._listenCheckingState()),w("_listenFilterChange",this._listenFilterChange()),this._isTextProcessing?w("_listenTextPaste",this._listenTextPaste()):o.Subscription.EMPTY,this._textProcessingLoader?w("_maintainTextInProcessingState",this._maintainTextInProcessingState()):o.Subscription.EMPTY,y.halfSidebar?o.Subscription.EMPTY:w("_trackSidebarState",this._trackSidebarState()),w("_trackLensChange",this._trackLensChange()),w("_trackAdvancedLensOpen",this._trackAdvancedLensOpen()),w("_trackTextPaste",this._trackTextPaste()),this.state.subscribe(function(e){var t=e.currentLens;return b._stateChangeCounter.getCounter(t.type).increment()})),this._isTextProcessing&&this._openSidebar&&this.switchTo(h.LensViewType.lensview),i.registerDebugHelper("pageState",function(){return b.state.get()})}return e.prototype.dispose=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},e.prototype.closeSidebar=function(){this._lensStateVM.focusLens(l.Lens.SpecialId.Closed,f.AlertActionSource.api,{order:"lensOrder"})},e.prototype.switchTo=function(e){switch(e){case h.LensViewType.proofit:this._lensStateVM.focusLens(l.Lens.SpecialId.Proofit,f.AlertActionSource.api,{order:"lensOrder"});break;case h.LensViewType.plagiarism:this._lensStateVM.focusLens(l.Lens.SpecialId.Plagiarism,f.AlertActionSource.api,{order:"lensOrder"});break;case h.LensViewType.advanced:this._lensStateVM.focusLens(l.Lens.SpecialId.Premium,f.AlertActionSource.sidebar,{order:"lensOrder"});break;case h.LensViewType.lensview:this._focusClosestAlert(!1,f.AlertActionSource.sidebar);break;case h.LensViewType.success:this._lensStateVM.focusLens(l.Lens.SpecialId.Success,f.AlertActionSource.api,{order:"lensOrder"});break;case h.LensViewType.closed:this._lensStateVM.focusLens(l.Lens.SpecialId.Closed,f.AlertActionSource.api,{order:"lensOrder"});break;default:i.assertNever(e)}},e.prototype.switchToCritical=function(){this._switchToAlertByLensType(l.Lens.Type.Critical)},e.prototype.switchToAdvanced=function(){this._features.isFree?this.switchTo(h.LensViewType.advanced):this._switchToAlertByLensType(l.Lens.Type.Advanced)},e.prototype.switchToLens=function(e,t,n){this._lensStateVM.focusLens(e,t,{order:n})},e.prototype.switchToAlert=function(e,t,n){try{this._lensStateVM.focusAlert(e,t,n)}catch(e){this._log.error("Cannot switchToAlert",e)}},e.prototype._listenAlertsUndoables=function(){var e=this;return this._alertList.alertEvents.do(function(t){"alert_removed"===t.kind&&void 0!==t.undoable&&c.createUndoNotification(e._ded,e._context.notifications,t.undoable,t.alerts,function(t){r.isOpened(e.state.get())&&(t.sort(f.Alert.comparator),e.switchToAlert(t[0],f.AlertActionSource.sidebar))})})},e.prototype._listenCheckingState=function(){var e=this,t=function(e){return e.currentLens.type===h.LensViewType.success};return this._documentModel.checkingState.startWith(this._documentModel.checkingState.get()).pairwise().withLatestFrom(this._sidebarVM.lenses,this.state,this.textInProcessing,this._sidebarVM.premium).filter(function(e){var t=e[0];t[0];return"idle"===t[1]}).do(function(n){var o=(n[0],n[1]),s=n[2],l=n[3];return e._features.denali.openOnPasteAndUploadMode.forEach(function(n){switch(n){case p.DenaliFeatures.OpenOnPasteOrUploadMode.simple:t(s)&&o.length>0&&a.Option.of(o[0]).forEach(function(t){return e.switchToLens(t.id,h.ForceAlertActionSource.forceText,"lensOrder")});break;case p.DenaliFeatures.OpenOnPasteOrUploadMode.goalsLoader:t(s)&&a.Option.of(o[0]).map(function(e){return e.id}).orElseL(function(){return e._sidebarVM.premium.get().count>0?a.Some(e._sidebarVM.premium.get().id):a.None}).forEach(function(t){var n=e._settingsModel.enableSetGoalsLoader.get()&&e._context.goalsVisibilityState?f.AlertActionSource.sidebar:h.ForceAlertActionSource.forceText;return e.switchToLens(t,n,"lensOrder")});break;case p.DenaliFeatures.OpenOnPasteOrUploadMode.tripleLoader:l?!t(s)&&r.isOpened(s)||(o.length>0?e._focusClosestAlert(!0,h.ForceAlertActionSource.forceSidebar):(e._features.denali.showNothingFoundNotification&&e._context.notifications.show(e._context.notifications.create.alertsNothingFound()),e._features.denali.halfSidebar||e.closeSidebar())):t(s)&&o.length>0&&e._focusClosestAlert(!0,h.ForceAlertActionSource.forceText);break;default:i.assertNever(n)}})})},e.prototype._maintainTextInProcessingState=function(){var e=this;return d.Observable.merge(this._documentModel.checkingState.withLatestFrom(this._sidebarVM.lenses).switchMap(function(t){var n=t[0],r=t[1];return"idle"===n?r.length>0?d.Observable.merge(d.Observable.timer(1e3).do(function(){e._log.warn("Waiting for markAndCardAligned aborted by timeout")}),e._alignmentVM.markAndCardAligned).first().mapTo(void 0).delay(500):d.Observable.of(void 0).delay(500):d.Observable.empty()}).mapTo(!1),this._ded.textChangedAfterPaste.filter(function(e){var t=e.type,n=e.len;return("reset"===t||"initial"===t)&&n>m.BIG_TEXT_SIZE}).mapTo(!0)).do(function(t){return e.textInProcessing.set(t)})},e.prototype._listenTextPaste=function(){var e=this;return this._ded.textChangedAfterPaste.filter(function(e){var t=e.type;return"initial"===t||"reset"===t}).withLatestFrom(this.state).do(function(t){var n=(t[0],t[1]);r.isOpened(n)||(e.switchTo(h.LensViewType.lensview),e.openedAfterPaste.next())})},e.prototype._listenFilterChange=function(){var e=this;return d.Observable.combineLatest(this._filter,this.state.view("currentLens").distinctUntilChanged(function(e,t){return e.id===t.id})).map(function(t){var n=t[0],r=t[1];return a.Some({filter:r.type===h.LensViewType.lensview||r.type===h.LensViewType.plagiarism?a.Some(function(e){return e.lensId===r.id||!r.meta.exclusiveHighlights&&!e.hasLongHighlight}):e._alertsFilter(n),lensId:a.Some(r.id)})}).do(i.RxUtils.toAtom(this.filterKit))},e.prototype._ensureAlertsFilter=function(){var e=this;return this.sidebarOpened.do(function(t){e._filter.set(t?"all":"free")})},e.prototype._trackTextPaste=function(){var e=this;return this._ded.textChangedAfterPaste.do(function(t){var n=t.type,r=t.len,o=t.tags;switch(n){case"initial":u.Monitoring.TimeSeries.root.getTimer("text_paste_initial").recordTime(r);break;case"reset":u.Monitoring.TimeSeries.root.getTimer("text_paste_reset").recordTime(r);break;case"partial":u.Monitoring.TimeSeries.root.getTimer("text_paste_partial").recordTime(r);break;default:i.assertNever(n)}e._log.info("Paste formatting text",{type:n,withFormatting:o.length>0,tags:o})})},e.prototype._trackLensChange=function(){var e=this;return this.state.skip(1).map(function(e){switch(e.currentLens.type){case h.LensViewType.lensview:case h.LensViewType.advanced:case h.LensViewType.plagiarism:return e.currentLens.meta.title;case h.LensViewType.proofit:case h.LensViewType.closed:case h.LensViewType.success:return null;default:return i.assertNever(e.currentLens)}}).distinctUntilChanged().filter(function(e){return null!==e}).do(function(t){return e._context.trackLensChange(t)})},e.prototype._trackAdvancedLensOpen=function(){var e=this;return this.state.filter(h.LensState.is(l.Lens.SpecialId.Premium)).do(function(){return e._context.trackAdvancedLensOpen(e._sidebarVM.premium.get().count>0)})},e.prototype._trackSidebarState=function(){var e=this;return this.sidebarOpened.skip(1).do(function(t){t?e._context.assistantSidebarShow():e._context.assistantSidebarClose()})},e.prototype._getClosestByPositionAlert=function(e){var t=this,n=e.predicate,r=e.focus;return this._ded.getCursor(r).flatMap(function(e){return f.Alert.findClosest(t._alertList.getAllAlertsAsSortedArray(function(e){return f.Alert.isAlert(e)&&(!n||n(e))}),e.index)})},e.prototype._focusClosestAlert=function(e,t){var n=this;this._getClosestByPositionAlert({focus:e}).fold(function(){a.Option.of(n._sidebarVM.lenses.get()[0]).map(function(e){return e.id}).orElseL(function(){return n._sidebarVM.premium.get().count>0?a.Some(l.Lens.SpecialId.Premium):n._features.denali.halfSidebar?a.None:a.Some(l.Lens.SpecialId.Success)}).forEach(function(e){return n._lensStateVM.focusLens(e,t,{order:"lensOrder"})})},function(e){return n._lensStateVM.focusAlert(e,t,"lensOrder")})},e.prototype._switchToAlertByLensType=function(e){var t=this;this._getClosestByPositionAlert({predicate:function(t){return t.alertType===e}}).fold(function(){t.switchTo(t._features.denali.halfSidebar?h.LensViewType.closed:h.LensViewType.success)},function(e){return t.switchToAlert(e,f.AlertActionSource.sidebar,"lensOrder")})},e}();t.PageViewModelImpl=v,function(e){var t=function(){function t(){this.state=s.Atom.create(g.closedLensState()),this.focusedAlert=s.Atom.create(a.None),this.focusedCard=s.Atom.create(a.None),this.sidebarOpened=this.state.view(e.isOpened),this.filterKit=s.Atom.create(a.None),this.switchTo=i.noop,this.switchToCritical=i.noop,this.switchToAdvanced=i.noop,this.switchToLens=i.noop,this.switchToAlert=i.noop,this.closeSidebar=i.noop,this.dispose=i.noop}return t}();e.Mock=t}(r=t.PageViewModel||(t.PageViewModel={}))},1488:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1640),i=n(1639);!function(e){e.Mini=r.BaseMiniCard,e.Card=i.BaseCard,e.Wrapper=i.CardWrapper}(t.BaseCard||(t.BaseCard={}))},1489:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(23),a=n(1616),s=n(7),l=n(122),c=n(6),u=n(3);n(1576);var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._subs=[],t._classes={hidden:"ps-hidden",visible:"ps-hovered",alwaysVisible:"ps-visible",fastTransition:"ps-fast-transition"},t._mount=function(e){t._el=e,t.props.onMount&&e&&t.props.onMount(e)},t._update=function(){requestAnimationFrame(function(){t._el&&a.update(t._el)})},t}return r.__extends(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.update,n=e.allowHover,r=e.showWhenScrollable,i=e.className,o=this._el;a.initialize(o,{suppressScrollX:!0,minScrollbarLength:40,handlers:["click-rail","drag-scrollbar","keyboard","passiveWheel","touch"]}),this._update(),(s=this._subs).push.apply(s,p.customize(o,{name:this.props.name,allowHover:n||!1,classes:this._classes}).concat([r?this.context.screen.resize.throttleTime(100).subscribe(this._update):this.context.screen.resize.debounceTime(200).subscribe(this._update)])),t&&this._subs.push(t.subscribe(this._update)),i&&this._subs.push(u.RxUtils.toObservable(i).map(function(e){return e?e.split(" "):[]}).scan(function(e,t){return e&&(n=o.classList).remove.apply(n,e),t&&(r=o.classList).add.apply(r,t),t;var n,r},[]).subscribe());var s},t.prototype.componentWillUnmount=function(){a.destroy(this._el),this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.render=function(){var e=this.props,t=e.children,n=e.allowHover,o=e.showWhenScrollable,a=e.onScroll,l=e.name;return i.createElement(s.F.div,r.__assign({},s.classes(!n&&this._classes.hidden,o&&this._classes.alwaysVisible),{onScroll:a?function(){return a.next()}:void 0,mount:this._mount,role:"scrollbar-"+l}),t)},t}(l.BaseComponent);t.ScrollBarY=d;var p;!function(e){var t=["mousewheel","DOMMouseScroll","wheel","touchmove"];e.customize=function(e,n){var r=n.name,i=n.allowHover,a=n.classes,s=c.Monitoring.Logging.getLogger("scrollBarY."+r,c.Logging.LogLevel.DEBUG),l=e.querySelector(".ps__scrollbar-y"),d=e.querySelector(".ps__scrollbar-y-rail"),p=o.Observable.merge(o.Observable.fromEvent(e,"mouseenter",{passive:!0}).mapTo(!0),o.Observable.fromEvent(e,"mouseleave",{passive:!0}).mapTo(!1)).distinctUntilChanged().startWith(!1),f=o.Observable.merge(o.Observable.fromEvent(d,"mouseenter",{passive:!0}).mapTo(!0),o.Observable.fromEvent(d,"mouseleave",{passive:!0}).mapTo(!1)).distinctUntilChanged().startWith(!1),h=o.Observable.merge(o.Observable.fromEvent(l,"mousedown",{passive:!0}).mapTo(!0),o.Observable.fromEvent(document,"mouseup",{passive:!0}).mapTo(!1)).startWith(!1),m=new o.BehaviorSubject(!1),g=o.Observable.merge(o.Observable.fromEvent(document,"paste",{passive:!0}),o.Observable.fromEvent(document,"mousedown",{passive:!0}).filter(function(e){var t=e.target;return t!==l&&t!==d}).do(function(e){return s.trace("force hide event",e)})).switchMap(function(){return o.Observable.from([!0,!1])}).startWith(!1);return[o.Observable.merge.apply(o.Observable,t.map(function(t){return o.Observable.fromEvent(e,t,{passive:!0})})).mapTo(!0).subscribe(m),o.Observable.combineLatest(p,h,f,g).switchMap(function(e){var t=e[0],n=e[1],r=e[2];return e[3]?o.Observable.of("forceHide"):n||r?r&&!n?o.Observable.of("show").delay(600):o.Observable.of("show"):t?o.Observable.merge(m.skip(1).throttleTime(100).mapTo("show"),m.mapTo("hide").throttleTime(100).switchMap(function(){return o.Observable.of("hide").delay(600)})):o.Observable.of("hide").delay(600)}).distinctUntilChanged().do(function(t){switch(window.dispatchEvent(new CustomEvent("scrollaction",{detail:t})),s.trace("new scroll action",{action:t}),t){case"show":e.classList.remove(a.hidden,a.fastTransition),e.classList.add(a.visible);break;case"hide":e.classList.remove(a.visible);break;case"forceHide":e.classList.remove(a.visible),e.classList.add(a.fastTransition);break;default:u.assertNever(t)}return t}).switchMap(function(e){return"show"===e?o.Observable.never():o.Observable.of(!0).delay(300)}).subscribe(function(){i||e.classList.add(a.hidden)})]}}(p||(p={}));!function(e){function t(t,n){return function(o){function a(){var t=null!==o&&o.apply(this,arguments)||this;return t._subs=[],t._onMount=function(e){t._cleanup(),t._init(e),t.props.onMount&&t.props.onMount(e)},t._init=function(r){t._subs.push(e.enable(r,{base:40,padding:15},e.linerSpeed(10,20),n.viewportPadding,n.onScrollOnSelect))},t._cleanup=function(){t._subs.forEach(function(e){return e.unsubscribe()}),t._subs=[]},t}return r.__extends(a,o),a.prototype.componentWillUnmount=function(){this._cleanup()},a.prototype.render=function(){return i.createElement(t,r.__assign({},this.props,{onMount:this._onMount}))},a}(i.Component)}e.withSelectOnScroll=t;var n;!function(e){e.above="above",e.below="below",e.in="in"}(n||(n={})),e.linerSpeed=function(e,t,n){return void 0===n&&(n=1),function(r){return Math.max(n,Math.min(r/e,t))}},e.enable=function(e,t,r,i,a){void 0===i&&(i=s.Atom.create({top:0,bottom:0}));var l=function(e,n,i,a){var s="up"===a?-1:1;return o.Observable.timer(0,50).withLatestFrom(o.Observable.fromEvent(document,"mousemove",{passive:!0}).throttleTime(100).map(function(t){return{speed:r("up"===a?e.top-t.clientY:t.clientY-e.bottom),mouseX:t.clientX,mouseY:t.clientY}}).startWith({speed:1,mouseX:n,mouseY:i})).map(function(e){var n=(e[0],e[1]),r=n.speed,i=n.mouseX,o=n.mouseY;return{offset:s*t.base*r,mouseX:i,mouseY:o}})},c=o.Observable.merge(o.Observable.fromEvent(e,"mousedown",{passive:!0}).mapTo(!0),o.Observable.fromEvent(document,"mouseup",{passive:!0}).mapTo(!1),o.Observable.fromEvent(document,"dragend",{passive:!0}).mapTo(!1),o.Observable.fromEvent(document,"click",{passive:!0}).mapTo(!1));return c.withLatestFrom(i).switchMap(function(r){var i=r[0],a=r[1];if(i){var s=e.getBoundingClientRect(),l={top:s.top+t.padding+a.top,bottom:s.bottom-t.padding-a.bottom};return o.Observable.fromEvent(document,"mousemove",{passive:!0}).map(function(e){return e.clientY<l.top?{rect:l,mouseX:e.clientX,mouseY:e.clientY,position:n.above}:e.clientY>l.bottom?{rect:l,mouseX:e.clientX,mouseY:e.clientY,position:n.below}:{rect:l,mouseX:e.clientX,mouseY:e.clientY,position:n.in}})}return o.Observable.of({position:n.in})}).distinctUntilChanged(function(e,t){return e.position===t.position}).switchMap(function(e){switch(e.position){case n.above:return l(e.rect,e.mouseX,e.mouseY,"up");case n.below:return l(e.rect,e.mouseX,e.mouseY,"down");case n.in:return o.Observable.empty();default:return u.assertNever(e)}}).subscribe(function(t){var n=t.offset,r=t.mouseX,i=t.mouseY;e.scrollTop+=n,a(r,i)}).add(c.switchMap(u.RxUtils.orEmpty(o.Observable.fromEvent(document,"wheel",{passive:!0}))).auditTime(200).subscribe(function(e){return a(e.clientX,e.clientY)}))}}(t.SelectAndScroll||(t.SelectAndScroll={}))},1493:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(13),i=n(7),o=n(6),a=n(122),s=n(3),l=n(36),c=function(e){var t=e.source,n=e.linkClassName;return r.createElement("a",{className:n,onClick:s.ReactUtils.preventDefault(function(){try{localStorage.setItem("pageReloadReason",JSON.stringify({source:t,location:window.location.href,timestamp:Date.now()}))}catch(e){}window.location.reload()})},"try to reload the page")};t.ErrorNotification=a.withContext(function(e,t){var n=e.errorMessage,i=e.linkClassName,o=t.appConfig;return r.createElement("div",{title:n},"Oops, there was a problem. Please try again later or"," ",r.createElement("a",{className:i,href:o.support.login,target:"_blank"},"contact support"))}),t.GenericNotification=function(e){var t=e.message,n=e.description,i=e.headerClassName;return n?r.createElement("div",null,r.createElement("p",{className:i},t),r.createElement("br",null),r.createElement("span",null,n)):r.createElement("div",null,t)},t.DocumentUploadedNotification=function(e){var t=e.navigateToDocument,n=e.linkClassName;return r.createElement("div",null,"Document successfully uploaded."," ",r.createElement("span",{className:n,onClick:t},"Open document for editing."))},t.NewDocumentCreatedNotification=function(e){var t=e.navigateToDocument,n=e.linkClassName;return r.createElement("div",null,"New document created."," ",r.createElement("span",{className:n,onClick:t},"Open document for editing."))},t.DocumentTypeUnsupportedNotification=a.withContext(function(e,t){var n=t.textResources;return r.createElement("div",null,"Unsupported file type. ",n.base.notificationUploadFileText,": Microsoft Word (.doc, .docx), OpenOffice (.odt), TXT and RTF.")}),t.DocumentWithTrackedChangesIsUnsupported=a.withContext(function(e,t){var n=e.linkClassName,i=t.appConfig;return r.createElement("div",null,"Your document contains revisions. Accept all revisions and try uploading again. Click"," ",r.createElement("a",{className:n,target:"_blank",href:i.support.documentAcceptTrackedChanges,onClick:s.ReactUtils.stopPropagation()},"here")," ","for details.")}),t.ChangeEmailNotification=function(e){var t=e.email;return r.createElement("div",null,"Please check your inbox at ",r.createElement("b",null,t)," to verify your new email address.")},t.LogoutErrorNotification=function(e){var t=e.forceRetry,n=e.timeToRetry,o=e.linkClassName,a=e.headerClassName;return r.createElement(i.F.div,null,r.createElement("p",{className:a},"Cannot log out"),n.view(function(e){return-1!==e?r.createElement("div",{key:"logoutErrorNotification"},"An error occurred while logging out.",r.createElement("br",null),r.createElement("span",{className:o,onClick:t},"Retrying in ",e," seconds.")):r.createElement("div",{key:"logoutErrorNotification"},"It seems that something is preventing a successful logout. Please reload the page and try again.")}))},t.SelfUpdateNotification=function(e){var t=e.linkClassName,n=e.headerClassName;return r.createElement("div",null,r.createElement("p",{className:n},"Grammarly needs to refresh this page"),"Don't worry - your documents have already been saved.",r.createElement("br",null),"Please"," ",r.createElement("span",{className:t,onClick:function(){window.location.reload()}},"reload")," ","the page (",l.hotkeyLabel("R",l.getBrowserInfo().os),").")},t.UnauthorizedErrorNotification=a.withContext(function(e,t){var n=e.linkClassName,i=t.appConfig;return r.createElement("div",null,"You have been logged out. You are being redirected to the login page. Please click"," ",r.createElement("a",{className:n,href:i.funnel.signin},"here")," ","if your browser does not redirect you.")}),t.OfflineNotification=function(e){var t=e.resetClock,n=e.reconnectTime,o=e.linkClassName,a=e.headerClassName;return r.createElement("div",null,r.createElement("p",{className:a},"Connection failure"),"Cannot connect to Grammarly because there is no Internet access available. ",r.createElement("br",null),r.createElement("span",{className:o,onClick:t},"Trying to reconnect in ",r.createElement(i.F.span,null,n.view(function(e){return e}))," seconds."))},t.SlowNetworkErrorNotification=function(){return r.createElement("div",null,"Your Internet connection is unstable. Grammarly may work slower than normal.")},t.UnknownConnectionError=function(e){var t=e.linkClassName;return r.createElement("div",null,"Oops, there was a problem. Please check your network configuration and"," ",r.createElement(c,{source:"UnknownConnectionError",linkClassName:t}),".")},t.ServerErrorNotification=function(e){var t=e.errorMessage,n=e.linkClassName;return r.createElement("div",{title:t},"The server encountered an error. Please"," ",r.createElement(c,{source:"ServerErrorNotification",linkClassName:n}),".")},t.ConnectionWSErrorNotification=a.withContext(function(e,t){var n=e.linkClassName,i=e.headerClassName,o=t.appConfig;return r.createElement("div",null,r.createElement("p",{className:i},"Connection failure"),"Your network configuration blocks Grammarly services on this computer.",r.createElement("br",null),"To troubleshoot this issue,"," ",r.createElement("a",{className:n,href:o.support.diagnosticTestPath,target:"_blank"},"click here"))}),t.ClientConnectionErrorNotification=function(e){var t=e.errorMessage,n=e.linkClassName;return r.createElement("div",{title:t},"Your Internet connection is unstable. Please check your network configuration and"," ",r.createElement(c,{source:"ClientConnectionErrorNotification",linkClassName:n}),".")},t.CheckingIsDownErrorNotification=function(){return r.createElement("div",null,"Error checking is temporarily unavailable. Our engineers are working quickly to resolve the issue. Please check back soon.")},t.DocumentSizeExceededNotification=function(e){var t=e.headerClassName;return r.createElement("div",null,r.createElement("p",{className:t},"Maximum document size exceeded"),"Currently, Grammarly supports documents of up to 60 pages (100,000 characters) and no larger than 4 MB. ",r.createElement("br",null),"We are working to increase the size of documents we support.")},t.DocumentIsEmptyNotification=function(){return r.createElement("div",null,"The submitted file is empty.")},t.DownloadDocumentNotFoundNotification=function(){return r.createElement("div",{"data-name":"document-not-found"},"Requested document was not found.")},t.IsTemporaryDownloadErrorNotification=function(){return r.createElement("div",null,"Document wasn't downloaded. Please try again.")},t.DocumentUploadErrorGeneralNotification=function(){return r.createElement("div",null,"Document wasn't uploaded. Please try again.")},t.DocumentDeletedNotification=function(e){var t=e.documentId,n=e.documentTitle,i=e.failedToRestore,a=e.linkClassName,l=e.show,c=e.notificationsFactory,u=e.restoreDocument,d=s.throttleByPromise(function(e,t){return u().catch(function(n){o.Monitoring.Logging.getLogger("notifications").error("Document restore fail",n),l(c.documentDeleted(e,t,u,!0))})});return r.createElement("div",null,i?'Oops, there was a problem. "'+n+"\" wasn't restored.":'"'+n+'" was deleted.'," ",r.createElement("a",{className:a,onClick:function(){return d(t,n)}},i?"Restore":"Undo"))},t.ExtensionInstallErrorNotification=a.withContext(function(e,t){var n=e.linkClassName,i=t.appConfig;return r.createElement("div",null,"An error occurred while installing the extension. Your browser may be blocking installation. Please try again by installing from the"," ",r.createElement("a",{className:n,href:i.extension.chrome.infoURL,target:"_blank"},"Chrome Web Store"))}),t.CopyToClipboardError=function(){return r.createElement("div",null,"Copying is not supported by your browser, but you can still use"," ",l.hotkeyLabel("C",l.getBrowserInfo().os)," for copy")},t.DocumentProofreadingNotification=function(e){var t=e.email;return r.createElement("div",null,"We’re proofreading your document. When complete, we will email a corrected version to ",t)},t.BlobDownloadUnsupportedNotification=a.withContext(function(e,t){var n=e.linkClassName,i=t.appConfig;return r.createElement("div",null,"The file cannot be downloaded because this browser does not support safe downloads.",r.createElement("br",null),"Please update your browser and try again.",r.createElement("br",null),r.createElement("a",{className:n,href:i.support.safariDownloadFilesKBUrl,target:"_blank"},"Learn more"))}),t.DownloadProofreadNotification=function(){return r.createElement("div",{"data-name":"proofread-downloaded"},"Document downloaded.")}},1494:function(e,t,n){"use strict";function r(e){var t=e.wrapperClassName,n=e.variation,l=(e.ref,i.__rest(e,["wrapperClassName","variation","ref"]));return o.createElement(a.F.span,{role:"spinner",className:t},s.RxUtils.mapMaybeObservable(n,function(e){return o.createElement(r.Svg,i.__assign({},l,{type:e}))}))}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(13),a=n(7),s=n(3),l=n(1723);t.Spinner=r,function(e){e.getClassName=function(e){return function(t){switch(t){case"red":return e.red;case"green":return e.green;case"blue":return e.blue;case"white":return e.white;case"violet":return e.violet;case"yellow":return e.yellow;case"gray":return e.gray;default:return s.assertNever(t)}}};var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n.prototype.componentDidMount=function(){s.invariant(null!==this.groupEl,"groupEl should be already mounted"),this.groupAnimation=this.groupEl.animate({transform:["rotate(0deg)","rotate(360deg)"]},{duration:2e3,easing:"linear",fill:"forwards",iterations:1/0})},n.prototype.componentWillUnmount=function(){this.groupAnimation&&this.groupAnimation.cancel()},n.prototype.render=function(){var t=this,n=this.props,r=n.className,s=n.size,c=void 0===s?64:s,u=n.strokeWidth,d=void 0===u?2:u,p=n.type,f=i.__rest(n,["className","size","strokeWidth","type"]);return o.createElement("svg",i.__assign({},a.classes(r),{viewBox:"25 25 50 50",width:c,height:c},f),o.createElement("g",{transform:"translate(50 50)"},o.createElement("g",{ref:function(e){return t.groupEl=e}},o.createElement("circle",i.__assign({},a.classes(l.path,e.getClassName(l)(p)),{cx:"50",cy:"50",r:"20",fill:"none",transform:"translate(-50 -50)",strokeWidth:d,strokeMiterlimit:"10"})))))},n}(o.PureComponent);e.Svg=t}(r=t.Spinner||(t.Spinner={}))},1495:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);!function(e){function t(e,t){return r.__assign({},e,{updateRanges:t})}function n(e,t){return r.__assign({},e,{visualState:t})}function i(e){return{visualState:e,updateRanges:!1}}e.updateRanges=t,e.updateVisualState=n,e.from=i}(t.MarkAlertState||(t.MarkAlertState={}));!function(e){e.initial="initial",e.highlighted="highlighted",e.active="active",e.faded="faded",e.hidden="hidden",e.applied="applied",e.disposed="disposed"}(t.MarkAlertVisualState||(t.MarkAlertVisualState={}))},1496:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(23),o=n(3);!function(e){e[e.ANIMATE_ALL=0]="ANIMATE_ALL",e[e.ANIMATE_MARK=1]="ANIMATE_MARK",e[e.NO_ANIMATION=2]="NO_ANIMATION"}(r=t.AlignmentAnimation||(t.AlignmentAnimation={}));var a=function(){function e(e,t){this._cardPositions=e,this._markPositions=t,this.markAndCardAligned=new i.Subject}return e.prototype.alignCardToMark=function(e,t){this._cardPositions.ensureCardPosition(e.cardId,t===r.ANIMATE_ALL,this._markPositions.getMarkAlertPosition(e.activeAlert))},e.prototype.alignMarkToCard=function(e,t){var n=e.cardId,i=e.activeAlert,o=this._cardPositions.ensureCardPosition(n,t===r.ANIMATE_ALL),a=o.top,s=o.contentOffset;this._markPositions.ensureAlertMarksInViewport(i,a+s,t!==r.NO_ANIMATION),this.markAndCardAligned.next(i.id)},e}();t.AlignmentViewModelImpl=a;!function(e){var t=function(){function e(){this.markAndCardAligned=new i.Subject,this.alignCardToMark=o.noop,this.alignMarkToCard=o.noop}return e}();e.Mock=t}(t.AlignmentViewModel||(t.AlignmentViewModel={}))},1497:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(23),o=n(1465),a=n(6),s=n(3),l=n(1463),c=n(1464),u=n(7),d=n(14),p=n(1648),f=function(){return{alertSource:l.AlertActionSource.api,switchOrder:"lensOrder",focusedLensIndex:0,currentLens:p.SuccessLensViewImpl.create()}};t.closedLensState=function(){return{alertSource:l.AlertActionSource.api,switchOrder:"lensOrder",focusedLensIndex:0,currentLens:p.ClosedLensViewImpl.create()}};var h=function(e){return{alert:e,lensId:e.lensId}},m=function(){function e(e,t){void 0===t&&(t=o.LensStateProvider.Mode.WITHOUT_ALL_ALERTS);var n=this;this.alertsList=e,this._mode=t,this._log=a.Monitoring.Logging.getLogger("FocusedLensManagerImpl"),this._lenses=this.alertsList.lenses.view(function(e){var t=c.Lens.SpecialId.Plagiarism,n=(e[t],c.Lens.SpecialId.Premium),i=(e[n],r.__rest(e,["symbol"==typeof t?t:t+"","symbol"==typeof n?n:n+""]));return s.ObjectUtils.toArray(i).sort(c.Lens.comparator)}),this.lenses=this._lenses.view(function(e){return n._mode===o.LensStateProvider.Mode.WITHOUT_ALL_ALERTS?e.slice(1):e}),this.plagiarism=this.alertsList.lenses.view(function(e){return e[c.Lens.SpecialId.Plagiarism]||c.Lens.createEmptyPlagiarismLens()}),this.premium=this.alertsList.lenses.view(function(e){return e[c.Lens.SpecialId.Premium]||c.Lens.createEmptyPremiumLens()}),this.readability=this.alertsList.lenses.view(function(e){return e[c.Lens.SpecialId.Readability]||c.Lens.createEmptyReadabilityLens()}),this._lensIndex=function(e,t){return e.findIndex(o.idFinder(t.meta))},this._lensAlerts=function(e){return n.alertsList.getAllAlertsAsSortedArray(e.filter)},s.registerDebugHelper("lensesView",function(){return n._log.debug(n.toString())})}return e._mapByLensId=function(e,t,n,r,i,o,a,s){switch(e){case c.Lens.SpecialId.Plagiarism:return t();case c.Lens.SpecialId.Premium:return n();case c.Lens.SpecialId.Proofit:return r();case c.Lens.SpecialId.Readability:return i();case c.Lens.SpecialId.Success:return o();case c.Lens.SpecialId.Closed:return a();default:return s()}},e._createLensByAlert=function(t,n,r){var i=r.findIndex(o.idFinder(t));return e._mapByLensId(n.id,function(){return p.PlagiarismLensViewImpl.create(n,r,i)},function(){return p.PremiumLensViewImpl.create(n,r)},function(){return p.ProofitLensViewImpl.create()},function(){return p.ReadabilityLensViewImpl.create(n,r,d.Some(i))},function(){return p.SuccessLensViewImpl.create()},function(){return p.ClosedLensViewImpl.create()},function(){return p.FocusedLensViewImpl.create(n,r,i)})},e.prototype.getLensEventsByLensId=function(e,t){var n=this,r=this._getLensMeta(t),a=this._lensAlerts(r),s=d.Option.of(a[0]),l=s.fold(function(){return n._createSuccessOrNonFocusedState(e,t)},function(t){return n._createStateByAlert(e,t,r,a)});return l.currentLens.cardAppearance===o.CardAppearance.never?i.Observable.of(o.LensStateProvider.Event.fromState(l)):this._generateEventsFromState(l)},e.prototype.getLensEventsByAlert=function(e,t,n){s.invariant(void 0!==this.alertsList.getAllAlerts()[n.id],"Can't focus non existing alert");var r=e.currentLens.meta.filter(n)?s.ObjectUtils.update(e,{currentLens:e.currentLens.select(n)}):this._createStateByAlert(e,n,this._getLensMeta(t));return r.currentLens.cardAppearance===o.CardAppearance.never?i.Observable.of(o.LensStateProvider.Event.fromState(r)):this._generateEventsFromState(r)},e.prototype.toString=function(){return JSON.stringify(this,void 0,2)},e.prototype.toJSON=function(){return{lenses:this.lenses.get(),plagiarism:this.plagiarism.get()}},e.prototype._generateEventsFromState=function(e){var t=this,n=e;return this.alertsList.alertEvents.switchMap(function(e){return t._filterEvents(e,n.currentLens.meta.filter)}).map(function(e){return t._transformAMEventToState(n,e)}).merge(this.lenses.distinctUntilChanged(s.ArrayUtils.equals).filter(function(){return o.LensState.isLensview(n)}).map(function(e){return t._transformLensesChangesToState(n,e)}).map(o.LensStateProvider.Event.fromState)).do(function(e){var t=e.state;return n=t}).startWith(o.LensStateProvider.Event.fromState(n))},e.prototype._transformAMEventToState=function(e,t){switch(t.kind){case"alert_added":var n=e.currentLens.add(t.alerts),r=n.currentLens,i=n.cardsToAdd,o=s.ObjectUtils.update(e,{currentLens:r});return{state:o,cardsToAdd:i,cardsToRemove:[]};case"alert_removed":var a=this._subtractAlertsFromState(e,t.alerts,t.source),o=a.state;return{state:o,cardsToAdd:[],cardsToRemove:a.cardsToRemove};case"alert_applied":return{state:e,cardsToAdd:[],cardsToRemove:[]};default:return s.assertNever(t)}},e.prototype._subtractAlertsFromState=function(e,t,n){var r=this,i=e.currentLens.remove(t),a=i.currentLens,l=i.cardsToRemove,u=s.ObjectUtils.update(e,{currentLens:a,alertSource:n});if(a.activeCardScheduledToDispose){this._log.debug("Oops. Current alert removed, focusing next one...");return this._nextAlert(u).fold(function(){var e=a.cardAppearance===o.CardAppearance.always?c.Lens.SpecialId.Success:a.id;return{state:r._createSuccessOrNonFocusedState(u,e),cardsToRemove:[]}},function(e){var t=e.alert,n=e.lensId;return u.currentLens.meta.filter(t)?{state:s.ObjectUtils.update(u,{currentLens:u.currentLens.select(t)}),cardsToRemove:l}:{state:r._createStateByAlert(u,t,r._getLensMeta(n)),cardsToRemove:[]}})}return{state:u,cardsToRemove:l}},e.prototype._createNonFocusedLens=function(t){var n=this;return e._mapByLensId(t,function(){return d.Some(p.PlagiarismLensViewImpl.create(n.plagiarism.get(),[],0))},function(){return d.None},function(){return d.Some(p.ProofitLensViewImpl.create())},function(){return d.Some(p.ReadabilityLensViewImpl.create(n.readability.get(),[],d.None))},function(){return d.None},function(){return d.Some(p.ClosedLensViewImpl.create())},function(){return d.None})},e.prototype._createSuccessOrNonFocusedState=function(e,t){var n=e.alertSource,r=e.switchOrder;return this._createNonFocusedLens(t).fold(function(){return f()},function(e){return{currentLens:e,focusedLensIndex:0,alertSource:n,switchOrder:r}})},e.prototype._getLensMeta=function(t){var n=this,r=e._mapByLensId(t,function(){return n.plagiarism.get()},function(){return n.premium.get()},function(){return c.Lens.createEmptyLens({id:c.Lens.SpecialId.Proofit,title:"Proofit"})},function(){return n.readability.get()},function(){return c.Lens.createEmptyLens({id:c.Lens.SpecialId.Success,title:"Success"})},function(){return c.Lens.createEmptyLens({id:c.Lens.SpecialId.Closed,title:"Closed"})},function(){return n.alertsList.lenses.get()[t]});return s.invariant(void 0!==r,"unknown lensId:"+t),r},e.prototype._createStateByAlert=function(t,n,r,i){var a=t.alertSource,s=t.switchOrder;void 0===i&&(i=this._lensAlerts(r));var l=e._createLensByAlert(n,r,i);return{currentLens:l,focusedLensIndex:l.type===o.LensViewType.lensview?this._lensIndex(this.lenses.get(),l):0,alertSource:a,switchOrder:s}},e.prototype._findNextAlertInText=function(e){var t=this.alertsList.getAllAlertsAsSortedArray(l.Alert.isAlert),n=s.ArrayUtils.lowerBound(t,function(t){return t.highlightRange.end<e.highlightRange.end});return d.Option.of(t[n]||t[n-1])},e.prototype._findNextAlertInLenses=function(e){var t=void 0,n=this.alertsList.getAllAlertsAsSortedArray(),r=function(e){return void 0!==(t=n.find(function(t){return t.lensId===e.id}))};return s.ArrayUtils.lookAround(this.lenses.get(),e.focusedLensIndex,r).map(function(e){return s.invariant(void 0!==t,"nextAlert should be defined"),t})},e.prototype._nextAlert=function(e){var t=this,n=e.currentLens,r=e.switchOrder;return n.cardAppearance===o.CardAppearance.optional||n.cardAppearance===o.CardAppearance.never?n.findNextAlert().map(h):this._findNextAlert(e,r).orElseL(function(){return t.premium.get().count>0?d.Option.of(t.alertsList.getAllAlertsAsSortedArray(l.Alert.isPremium)[0]).map(h):d.None})},e.prototype._findNextAlert=function(e,t){var n=this;switch(this._mode){case o.LensStateProvider.Mode.WITH_ALL_ALERTS:return e.currentLens.findNextAlert().map(h).orElseL(function(){return n._findNextAlertInText(e.currentLens.card.activeAlert).map(function(e){return{alert:e,lensId:c.Lens.SpecialId.AllIssues}})});case o.LensStateProvider.Mode.WITHOUT_ALL_ALERTS:return("textOrder"===t?this._findNextAlertInText(e.currentLens.card.activeAlert):e.currentLens.findNextAlert().orElseL(function(){return n._findNextAlertInLenses(e)})).map(h);default:return s.assertNever(this._mode)}},e.prototype._transformLensesChangesToState=function(e,t){s.invariant(o.LensState.isLensview(e),"we can update meta only for lensview state type");var n=this._lensIndex(t,e.currentLens);return n>-1?s.ObjectUtils.update(e,{currentLens:e.currentLens.updateMeta(t[n]),focusedLensIndex:n}):(this._log.warn("active lens was removed"),e)},e.prototype._filterEvents=function(e,t){if("alert_applied"===e.kind)return t(e.alert)?i.Observable.of(e):i.Observable.empty();var n=e.alerts.filter(t);return n.length>0?i.Observable.of(r.__assign({},e,{alerts:n})):i.Observable.empty()},e}();t.SidebarViewModelImpl=m,function(e){var t=function(){function e(){this.premium=u.Atom.create(c.Lens.createEmptyPremiumLens()),this.lenses=u.Atom.create([]),this.state=u.Atom.create(f())}return e.prototype.focusLens=function(e){throw new Error("Method not implemented.")},e.prototype.focusAlert=function(e){throw new Error("Method not implemented.")},e.prototype.disposeCard=function(e){throw new Error("Method not implemented.")},e.prototype.getLensEventsByLensId=function(e,t){throw new Error("Method not implemented.")},e.prototype.getLensEventsByAlert=function(e,t,n){throw new Error("Method not implemented.")},e}();e.Mock=t}(m=t.SidebarViewModelImpl||(t.SidebarViewModelImpl={})),t.SidebarViewModelImpl=m},1498:function(e,t,n){"use strict";function r(e){var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.__extends(t,e),t}(m);return n.className=f.mark_underline+"_"+e,n.blotName=t.getBlotName(e),n.markId=e,n}function i(e){return g.blotName=t.getBlotName(e),g.className=f.mark_underline+"_"+e,g}function o(e){c.register("formats/"+e.blotName,e,!0)}function a(e){var n=c.imports[t.getFullBlotName(e)];if(t.isUnderline(n))return n;v.add(e);var i=r(e);return o(i),i}function s(e){c.imports[t.getFullBlotName(e)]&&o(i(e)),v.delete(e)}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),c=n(1472),u=n(1652),d=n(3),p=n(1477),f=n(1582),h=n(6);t.MarkerBlotName="mark_underline";var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._isUnderline=function(e){return-1!==e.indexOf("underline")},t}return l.__extends(t,e),Object.defineProperty(t.prototype,"markId",{get:function(){return this.statics.markId},enumerable:!0,configurable:!0}),t.create=function(t){var n=e.create.call(this,t),r=t?t.id:"";return n.setAttribute("data-mark-id",r),n.__dataId=r,t.action===p.Mark.ActionType.remove?(n.__unwrapMe=!0,n.__dataOrder=0,n.className=d.DOM.classes(this.className)):(n.__dataOrder=t.order||0,void 0!==t.order&&n.setAttribute("data-order",""+t.order),n.className=d.DOM.classes.apply(d.DOM,[this.className].concat(t.classes||[]))),n},t.prototype.wrap=function(t,n){return this.domNode.classList.add(f.prevent_animation),e.prototype.wrap.call(this,t,n)},t.prototype.clone=function(){this.domNode.classList.add(f.prevent_animation);var t=e.prototype.clone.call(this),n=t.domNode;return n.__dataOrder=this.domNode.__dataOrder,n.__dataId=this.domNode.__dataId,n.__unwrapMe=this.domNode.__unwrapMe,t},t.prototype.formatAt=function(t,n,r,i){if(r===this.statics.blotName){if(!i)return;if(i.action===p.Mark.ActionType.remove)if(i.removeType===p.Mark.RemoveType.partial)e.prototype.formatAt.call(this,t,n,r,!1);else{var o=this.length();i.removeType!==p.Mark.RemoveType.byPartialMatch||0===t&&n===o||h.Monitoring.Logging.getLogger("marker").warn("Attempt to remove blot by corrupted position",{id:this.markId,got:{index:t,length:n},expected:{index:0,length:o}}),e.prototype.formatAt.call(this,0,o,r,!1)}else i.action!==p.Mark.ActionType.create&&i.action!==p.Mark.ActionType.update||(this.domNode.className=d.DOM.classes.apply(d.DOM,[this.statics.className,f.prevent_animation].concat(i.classes||[])),e.prototype.formatAt.call(this,t,n,r,i))}else this._isUnderline(r)&&i&&i.action===p.Mark.ActionType.create?this._formatOverlaps(t,n,r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype._formatOverlaps=function(t,n,r,i){d.invariant(void 0!==this.domNode.__dataOrder,"dataOrder should be defined");var o=this.domNode.__dataOrder;if(!(i.action===p.Mark.ActionType.remove||o>=i.order)){return void this.isolate(t,n).wrap(r,i)}e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.format=function(t,n){t!==this.statics.blotName||n?e.prototype.format.call(this,t,n):this.unwrap()},t.prototype.optimize=function(t){e.prototype.optimize.call(this,t),this.domNode.__unwrapMe&&this.unwrap(),v.has(this.domNode.__dataId)||(h.Monitoring.Logging.getLogger("marker").warn("Unwrap already removed mark",{id:this.markId}),this.unwrap())},t.formats=function(){return!0},t}(u.Inline);t.Marker=m,m.tagName="SPAN",t.isUnderline=function(e){return!!e&&Object.getPrototypeOf(e)===m},t.getBlotName=function(e){return t.MarkerBlotName+"_"+e},t.getFullBlotName=function(e){return"formats/"+t.getBlotName(e)},t.isFakeUnderline=function(e){return e===g};var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.__extends(t,e),t.prototype.allowUnwrap=function(){return Object.getPrototypeOf(this)===t.prototype&&"SPAN"===this.domNode.tagName},Object.defineProperty(t.prototype,"logName",{get:function(){return"fake_underline_blot"},enumerable:!0,configurable:!0}),t}(u.SelfUnwrappingInlineBlot);t.FakeUnderline=g;var v=new Set;t.registerMark=a,t.deregisterMark=s},1500:function(e,t){e.exports={markBase:"_eb7101f3-alerts-markBase",critical:"_cc65a3a0-alerts-critical _eb7101f3-alerts-markBase",markSelected:"_1cfec21a-alerts-markSelected",markSelectedHigh:"_c9f7ef98-alerts-markSelectedHigh",markActive:"_20198b25-alerts-markActive",advanced:"_f5d63dbc-alerts-advanced _eb7101f3-alerts-markBase",plagiarism:"_2ed9514c-alerts-plagiarism _eb7101f3-alerts-markBase",synonym:"_e02617e0-alerts-synonym _eb7101f3-alerts-markBase",markAnimated:"_abf4ce16-alerts-markAnimated",markUnderlineBorder:"_35763042-alerts-markUnderlineBorder",markHidden:"_c0150c8e-alerts-markHidden",markApplied:"_4eae16c7-alerts-markApplied",applyFadeOut:"_44643231-alerts-applyFadeOut",noAnimation:"_69518293-alerts-noAnimation"}},1501:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(23),a=n(7),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._state=t.props.state.scan(function(e,t){return[t,e[0]]},[]).map(function(e){var n=e[0],r=e[1],i=t.props.stateToClassMapper(r,n);return{prev:{state:r,view:t._createTransition(i.prev)},next:{state:n,view:t._createTransition(i.next)}}}),t._elements=a.Atom.create([null,null]),t._done=new o.Subject,t._subs=[],t}return r.__extends(t,e),t.prototype._createTransition=function(e){var t=e.start,n=e.end;return o.Observable.create(function(e){e.next(t);var r=requestAnimationFrame(function(){return requestAnimationFrame(function(){return e.next(n)})});return function(){return cancelAnimationFrame(r)}})},t.prototype.componentDidMount=function(){var e=this,t=this.props.children;this._subs.push(this._state.map(function(n){var r=n.prev,i=n.next;if(void 0===t)return[null,null];var o=t;return void 0===r.state?[o({state:i.state,view:i.view,type:"next"})]:[o({state:r.state,view:r.view,type:"prev",done:function(){return e._done.next("prev")}}),o({state:i.state,view:i.view,type:"next"})]}).subscribe(function(t){var n=t[0],r=t[1];return e._elements.set([n,r])}),this._done.subscribe(function(t){"prev"===t&&e._elements.modify(function(e){e[0];return[null,e[1]]}),"next"===t&&e._elements.modify(function(){return[null,null]})}))},t.prototype.componentWillUnmount=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,r=e.onMount;return t?i.createElement(a.F.div,{className:n,mount:r},this._elements):null},t}(i.Component);t.AnimationWrapper=s},1502:function(e,t,n){"use strict";function r(e,t,n,r,a){switch(e.type){case"error":return o.createElement(c.ErrorNotification,{errorMessage:e.args.errorMessage,linkClassName:a.link});case"documentUploaded":return o.createElement(c.DocumentUploadedNotification,{navigateToDocument:e.args.navigateToDocument,linkClassName:a.link});case"isTemporaryDownloadError":return o.createElement(c.IsTemporaryDownloadErrorNotification,null);case"downloadDocumentNotFoundError":return o.createElement(c.DownloadDocumentNotFoundNotification,null);case"newDocumentCreated":return o.createElement(c.NewDocumentCreatedNotification,{navigateToDocument:e.args.navigateToDocument,linkClassName:a.link});case"documentDeleted":var s=e.args,u=s.documentId,d=s.documentTitle,p=s.failedToRestore,f=s.restoreDocument;return o.createElement(c.DocumentDeletedNotification,i.__assign({},{documentId:u,documentTitle:d,failedToRestore:p,restoreDocument:f},{linkClassName:a.link,hide:t,show:n,notificationsFactory:r}));case"documentTypeUnsupported":return o.createElement(c.DocumentTypeUnsupportedNotification,null);case"trackedChangesIsUnsupported":return o.createElement(c.DocumentWithTrackedChangesIsUnsupported,{linkClassName:a.link});case"documentUploadGeneralError":return o.createElement(c.DocumentUploadErrorGeneralNotification,null);case"changeEmail":return o.createElement(c.ChangeEmailNotification,{email:e.args.email});case"generic":var h=e.args,m=h.message,g=h.description;return o.createElement(c.GenericNotification,i.__assign({},{message:m,description:g},{headerClassName:a.header}));case"documentSizeExceeded":return o.createElement(c.DocumentSizeExceededNotification,{headerClassName:a.header});case"documentIsEmpty":return o.createElement(c.DocumentIsEmptyNotification,null);case"logoutError":var v=e.args,_=v.forceRetry,b=v.timeToRetry;return o.createElement(c.LogoutErrorNotification,i.__assign({},{forceRetry:_,timeToRetry:b},{linkClassName:a.link,headerClassName:a.header}));case"selfUpdateBlocker":return o.createElement(c.SelfUpdateNotification,{linkClassName:a.link,headerClassName:a.header});case"unauthorizedError":return o.createElement(c.UnauthorizedErrorNotification,{linkClassName:a.link});case"offline":var y=e.args,w=y.resetClock,E=y.reconnectTime;return o.createElement(c.OfflineNotification,i.__assign({},{resetClock:w,reconnectTime:E},{linkClassName:a.link,headerClassName:a.header}));case"unknownConnectionError":return o.createElement(c.UnknownConnectionError,{linkClassName:a.link});case"serverError":return o.createElement(c.ServerErrorNotification,{linkClassName:a.link});case"connectionWSError":return o.createElement(c.ConnectionWSErrorNotification,{linkClassName:a.link,headerClassName:a.header});case"clientConnectionError":return o.createElement(c.ClientConnectionErrorNotification,{linkClassName:a.link});case"slowNetwork":return o.createElement(c.SlowNetworkErrorNotification,null);case"checkingIsDown":return o.createElement(c.CheckingIsDownErrorNotification,null);case"extensionInstallFailed":return o.createElement(c.ExtensionInstallErrorNotification,{linkClassName:a.link});case"copyToClipboardFailed":return o.createElement(c.CopyToClipboardError,null);case"proofitInProgress":return o.createElement(c.DocumentProofreadingNotification,{email:e.args.email});case"blobDownloadUnsupported":return o.createElement(c.BlobDownloadUnsupportedNotification,{linkClassName:a.link});case"downloadProofread":return o.createElement(c.DownloadProofreadNotification,null);default:return l.Monitoring.Logging.getLogger("notifications").error("Notification component for '"+e.type+"' not found."),o.createElement(c.ErrorNotification,{linkClassName:a.link})}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(13),a=n(7),s=n(122),l=n(6),c=n(1493),u=n(3),d=n(1518);i.__exportStar(n(1493),t),t.defaultRenderNotification=r,t.NotificationView=function(e){var t=e.notification,n=e.hide,r=e.visibilityState,s=e.notifications,l=e.renderNotification,c=e.show,u=e.className;return o.createElement(a.F.div,i.__assign({key:t.id},a.classes(d.notification,r.map(function(e){return e?d.show:d.hide}),u)),o.createElement("span",{className:d.content,key:t.id},l(t,function(){return s.hide(t.id)},c,s.create,d)),!t.dontCloseOnClick&&o.createElement("div",{onClick:function(){return n(t.id,!0)},className:d.close}))},t.NotificationCenter=s.withContext(function(e,n){function s(e){m.set(e);var t=m.get();t&&t.id===e.id&&u.tick(function(){return h.set(!0)}),e.showTimeMs===1/0||e.important||setTimeout(function(){l(e.id,!0)},e.showTimeMs||7e3)}function l(e,t){void 0===t&&(t=!1);var n=m.get();u.tick(function(){n&&n.id===e&&h.set(!1),setTimeout(function(){var n=m.get();if(t&&c.expire(e),n&&n.id===e){var r=g.get();r&&s(r)}},400)})}var c=e.notifications,d=e.renderNotification,p=void 0===d?r:d,f=n.appRouter,h=a.Atom.create(!1),m=a.Atom.create(void 0),g=c.items.view(a.Lens.find(function(e){return!e.expired}));return g.subscribe(function(e){var t=m.get();t&&l(t.id),void 0===t&&void 0!==e&&s(e)}),f&&f.location&&f.location.subscribe(function(e){return c.cleanup()}),o.createElement(a.F.div,null,m.map(function(e){return void 0===e?null:o.createElement(t.NotificationView,i.__assign({},{notification:e,notifications:c,show:s,hide:l,visibilityState:h,renderNotification:p}))}))})},1503:function(e,t,n){"use strict";function r(e,t){return{re:new RegExp("^("+e+")([\\s\\S]*)$"),createResult:t}}function i(e){for(var t=[],n=e,r=!1,i=0,o=void 0;s.notEmpty(n);){var l=function(e){for(var t=0,n=p;t<n.length;t++){var r=n[t],i=e.match(r.re);if(null!==i)return[r.createResult(i),i[i.length-1]]}}(n);void 0===l&&(r=!0);var c=l||function(t){var n=["<span class='gr_grammar_del'>","<span class='gr_grammar_ins'>","→"].map(function(e){return t.indexOf(e)});if(n.findIndex(function(e){return 0===e})>0)throw new Error("Couldn't parse transform: "+e);if(n=n.filter(function(e){return e>0}),s.notEmpty(n)){var r=Math.min.apply(Math,n);return[{type:"text",text:t.substring(0,r)},t.substring(r)]}return[{type:"text",text:t},""]}(n),u=c[0],d=c[1];o&&"text"===o.type&&"text"===u.type?o.text+=u.text:(o&&"delete"===o.type&&"insert"===u.type&&(t.push({type:"arrow"}),i++),t.push(u)),"arrow"===u.type&&i++,o=t[t.length-1],n=d}return(r||!s.notEmpty(t)||i>1)&&a.Monitoring.Logging.getLogger("model.editor.alert_replacement").warn("Bad parsing of transform",{transformHtml:e,transformPartCount:t.length,arrowCount:i}),t}Object.defineProperty(t,"__esModule",{value:!0});var o=n(14),a=n(6),s=n(3),l=function(){function e(e,t){this.labels=e,this.tooltipText=t}return e}();t.InsertListLabel=l;var c=function(){function e(e,t){this.labels=e,this.tooltipText=t}return e}();t.DeleteListLabel=c;var u=function(){function e(e,t,n){this.tooltipText=n,this.labels=[e,t]}return e}();t.OrReplacementsLabel=u;var d=function(){function e(e,t,n,r){this.original=e,this.labels=t,this.tooltipText=n,this.onlyReplacements=r||this._isLong(e,t[0])}return e.prototype._isLong=function(e,t){return e.concat(t).map(function(e){return e.text.length}).reduce(s.sum,0)>30},e}();t.ArrowReplacementsLabel=d;!function(e){function t(e){return e.findIndex(function(e){return"arrow"===e.type})}function n(e){return e.slice(0,t(e))}function r(e){return e.slice(t(e)+1)}function a(e){return e.every(function(e){return"delete"!==e.type})}function p(e){return e.every(a)}function f(e){return 2===e.length&&p(e)}function h(e,i){s.invariant(s.notEmpty(e),"transforms should have at least one element");var o=e[0];return t(o)>-1?new d(n(o),e.map(r),i):f(e)?new u(e[0],e[1],i):p(e)?new l(e,i):new c(e,i)}function m(e,i){s.invariant(s.notEmpty(e),"transforms should have at least one element");var o=e[0];return t(o)>-1?new d(n(o),e.map(r),i,!0):new l(e,i)}function g(e){var t=e.replacements,n=e.transforms,r=e.todo,a="Click to "+r;return o.Option.of(t).filter(s.notEmpty).map(function(){return o.Option.of(n).map(function(e){return h(e.map(i),a)}).getOrElseL(function(){return m(t.map(function(e){return[{type:"insert",text:e}]}),a)})})}e.create=h,e.createOnlyInserts=m,e.parse=g}(t.ReplacementsLabels||(t.ReplacementsLabels={}));var p=[r("(?:\\<span class='gr_grammar_del'\\>([\\S\\s]*?)\\</span\\>)",function(e){return{type:"delete",text:e[2]}}),r("(?:\\<span class='gr_grammar_ins'\\>([\\S\\s]*?)\\</span\\>)",function(e){return{type:"insert",text:e[2]}}),r("(→)",function(e){return{type:"arrow"}}),r("([^<>→]+)",function(e){return{type:"text",text:e[1]}})];t.parseTransformHtml=i},1504:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(23),o=n(7),a=n(6),s=n(1465),l=n(1464),c=n(1463),u=n(3);!function(e){e.cards="cards",e.loading="loading",e.originality100="originality100"}(r=t.PlagiarismViewType||(t.PlagiarismViewType={}));!function(e){e[e.CHECKED=0]="CHECKED",e[e.NOT_CHECKED=1]="NOT_CHECKED"}(t.PlagiarismCheckingState||(t.PlagiarismCheckingState={}));var d=function(){function e(e,t,n,c){var u=this;this._ded=e,this._plagiarismModel=t,this._sidebarViewModel=n,this._pageViewModel=c,this._subs=[],this._log=a.Monitoring.Logging.getLogger("PlagiarismViewModel"),this._wholeTextLength=i.Observable.defer(function(){return u._ded.changes.auditTime(5e3).startWith(void 0).map(function(){return u._ded.getText().trim().length})}),this.plagiarismViewState=o.Atom.create({type:r.loading}),this.checkingState=o.Atom.combine(this._plagiarismModel.checkingState,this._sidebarViewModel.plagiarism,function(e,t){return{type:"idle"===e?"idle":"checking",percent:u._calcPercents(t.textLength),sources:t.count}}),this._subs.push(this._pageViewModel.state.view(s.LensState.is(l.Lens.SpecialId.Plagiarism)).skip(1).subscribe(function(e){e?u._plagiarismModel.enable():u._plagiarismModel.disable()}),this._maintainPlagiarismState())}return e.prototype.recheck=function(){return this._plagiarismModel.recheck()},e.prototype.dispose=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},e.prototype._getPlagiarismState=function(e,t){if(t.visibleCards.length>0&&t.card.nonEmpty())return{type:r.cards,currentLens:t.meta};switch(e){case"full":case"checking":return{type:r.loading};case"idle":return{type:r.originality100};default:return u.assertNever(e)}},e.prototype._buildState=function(e){var t=this;return this._plagiarismModel.checkingState.map(function(n){return t._getPlagiarismState(n,e.currentLens)}).filter(function(n){if(n.type===r.originality100){return e.currentLens.findNextAlert().fold(function(){return!0},function(e){return requestAnimationFrame(function(){return t._pageViewModel.switchToAlert(e,c.AlertActionSource.api,"lensOrder")}),!1})}return!0}).do(u.RxUtils.toAtom(this.plagiarismViewState)).mapTo(void 0)},e.prototype._maintainPlagiarismState=function(){var e=this;return this._pageViewModel.state.switchMap(function(t){return s.LensState.is(l.Lens.SpecialId.Plagiarism)(t)?e._buildState(t):i.Observable.empty()}).subscribe()},e.prototype.getPercent=function(e){return this._calcPercents(e.map(function(e){return e.highlightText.length}).reduce(u.sum,0))},e.prototype._calcPercents=function(e){var t=this;return this._wholeTextLength.do(function(n){e>n&&t._log.info("wholeTextLength is smaller than plagiarized text length",{wholeLenght:n,textLength:e})}).map(function(t){return t>0?Math.round(1e4*e/t)/100:0}).map(function(e){return 0===e?0:e>1?Math.round(e):1})},e}();t.PlagiarismViewModelImpl=d;!function(e){var t=function(){function e(){this.plagiarismViewState=o.Atom.create({type:r.loading}),this.checkingState=o.Atom.create({type:"idle",percent:i.Observable.of(20),sources:1}),this.recheck=function(){return Promise.resolve()}}return e.prototype.getPercent=function(){return i.Observable.of(20)},e}();e.Mock=t}(t.PlagiarismViewModel||(t.PlagiarismViewModel={}))},1505:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(1488),s=n(1464),l=n(1580);t.Mini=function(e){var t=e.card,n=e.context,c=e.marksVM,u=e.pageViewModel;return i.createElement(a.BaseCard.Mini,r.__assign({},o.classes(l.wrapper,s.Lens.typeMatch(t.activeAlert.alertType)({critical:l.dotCritical,advanced:l.dotAdvanced})),{marksVM:c,pageViewModel:u},{cardId:t.cardId,getActiveAlert:function(){return t.activeAlert}}),n.prev.map(function(e){return i.createElement("span",{className:l.text},e.replace(/\s$/," "))}).orNull(),i.createElement("span",{className:s.Lens.typeMatch(t.activeAlert.alertType)(l)},t.activeAlert.highlightText),n.next.map(function(e){return i.createElement("span",{className:l.text},e.replace(/^\s/," "))}).orNull())}},1506:function(e,t,n){"use strict";function r(e,t,n){return"text"===e.type?e.text:l.createElement("span",{key:t,className:n},e.text)}function i(e,t){return function(n){var r=p.calcDiff(e,n.text);return r?[r[0],l.createElement("span",{key:t,className:f.diff},r[1]),r[2]]:n.text}}function o(e,t){return"delete"===e.type?l.createElement("span",s.__assign({key:"strike"},c.classes(p.Strike.getClass(f,e.text),t)),e.text):e.text}function a(e,t){var n=e.tooltipText,o=e.labels,a=e.original,c=e.onlyReplacements,u=1===a.length,d=(u?[a[0].text,o[0][0].text].map(i):[r,r])[0];return l.createElement("div",{className:f.list},!c&&l.createElement(g,{transform:a}),l.createElement("div",{className:f.arrowInsertsList},o.map(function(e,r){return l.createElement(h,s.__assign({},{key:r,title:n,onClick:t(r)},{transform:e,boldifier:d}))})))}Object.defineProperty(t,"__esModule",{value:!0});var s=n(2),l=n(13),c=n(7),u=n(1461),d=n(1503),p=n(1651),f=n(1581),h=function(e){var t=e.transform,n=e.title,r=e.boldifier,i=void 0===r?function(e){return e.text}:r,o=e.classes,a=void 0===o?f:o,c=e.onClick;return l.createElement(u.Button,s.__assign({name:"apply-insert"},{onClick:c,title:n,className:a.itemInsert}),t.map(function(e,t){return i(e,t,f.diff)}))},m=function(e){var t=e.transform,n=e.title,r=e.classes,i=void 0===r?f:r,a=e.onClick;return l.createElement(u.Button,s.__assign({name:"apply-remove"},{onClick:a,title:n,className:i.itemRemove}),t.map(function(e){return o(e)}))},g=function(e){var t=e.transform,n=e.boldifier,r=void 0===n?function(e){return e.text}:n;return l.createElement("div",{className:f.itemOriginal},l.createElement("span",{className:f.itemOriginalContent},t.map(function(e,t){return r(e,t,f.diff)})))},v=function(e){var t=e.transform,n=e.boldifier,r=void 0===n?function(e){return e.text}:n,i=e.header,o=e.classes,a=void 0===o?f:o,c=e.onClick;return l.createElement(u.Button,s.__assign({name:"inline-apply-insert"},{onClick:c,className:a.item}),i&&l.createElement("div",{className:a.inlineHeader},i),t.map(function(e,t){return r(e,t,f.diff)}))};t.ReplacementsLabelsComponent=function(e){var t=e.replacementsLabels,n=e.onClick,i=t.tooltipText;return t instanceof d.InsertListLabel?l.createElement("div",{className:f.list},t.labels.map(function(e,t){return l.createElement(h,s.__assign({},{key:t,title:i,onClick:n(t)},{transform:e}))})):t instanceof d.DeleteListLabel?l.createElement("div",{className:f.list},t.labels.map(function(e,t){return l.createElement(m,s.__assign({},{key:t,title:i,onClick:n(t)},{transform:e}))})):t instanceof d.ArrowReplacementsLabel?a(t,n):t instanceof d.OrReplacementsLabel?l.createElement("div",{className:f.list},l.createElement(h,s.__assign({transform:t.labels[0]},{title:i,onClick:n(0)},{boldifier:r})),l.createElement("span",{className:f.or},"or"),l.createElement(h,s.__assign({transform:t.labels[1]},{title:i,onClick:n(1)},{boldifier:r}))):l.createElement("div",null)},t.InlineReplacementsLabelsComponent=function(e){var t=e.replacementsLabels,n=e.onClick,i=e.header,a=e.customStyle,c=1===t.labels.length?a.inlineHeaderOne:a.inlineHeader;if(t instanceof d.DeleteListLabel){var u=function(e){return o(e,a.strike)};return l.createElement("div",{className:a.inlineWrappedList},t.labels.map(function(e,t){return l.createElement(v,s.__assign({},{key:t,onClick:n(t)},{classes:{item:a.itemRemove,inlineHeader:c},boldifier:u,transform:e,header:0===t?i:""}))}))}if(t instanceof d.InsertListLabel||t instanceof d.OrReplacementsLabel||t instanceof d.ArrowReplacementsLabel){var p=function(e,t){return r(e,t,a.diff)};return l.createElement("div",{className:a.inlineWrappedList},t.labels.map(function(e,t){return l.createElement(v,s.__assign({},{key:t,onClick:n(t)},{classes:{item:a.itemInsert,inlineHeader:c},transform:e,boldifier:p,header:0===t?i:""}))}))}return l.createElement("div",null)}},1507:function(e,t){e.exports={tooltip:"_65b505ae-tooltip-tooltip",visible:"_10963d7e-tooltip-visible",hidden:"_66f64a2e-tooltip-hidden",tooltipTopCenter:"_d4ce0947-tooltip-tooltipTopCenter",tooltipTopRight:"_7edbe91b-tooltip-tooltipTopRight",tooltipTopLeft:"_c92ac29b-tooltip-tooltipTopLeft",tooltipBottomCenter:"_432b0188-tooltip-tooltipBottomCenter",tooltipBottomRight:"_830e94b1-tooltip-tooltipBottomRight",tooltipBottomLeft:"_5b86ddb4-tooltip-tooltipBottomLeft",tooltipMiddleLeft:"_b2f8c8e9-tooltip-tooltipMiddleLeft",tooltipMiddleRight:"_3a232a04-tooltip-tooltipMiddleRight"}},1508:function(e,t){e.exports={tooltip:"_0f3db3bb-tooltip-tooltip",top:"_cb214808-tooltip-top",right:"_08f0478b-tooltip-right"}},1511:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(14),a=n(7),s=n(122),l=n(1475),c=n(3),u=n(1507),d={style:{top:0,left:0},className:u.hidden},p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._subs=[],t._props=a.Atom.create(d),t._visible=a.Atom.create(!1),t._state=a.Atom.create(o.None),t._validateFit=function(e){var n=e.alignment,r=e.target;if(t._el){var i=document.body.getBoundingClientRect(),o=t._el.getBoundingClientRect(),a=t._getVAlign(n,i,o)+t._getHAlign(n,i,o);a!==n&&t._props.set(t._calcProps({alignment:a,targetRect:r.getBoundingClientRect(),elRect:o}))}t._visible.set(!0)},t}return r.__extends(t,e),t.prototype.componentDidMount=function(){this._listenStyles()},t.prototype.componentWillUnmount=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},t.prototype.render=function(){var e=this;return i.createElement(l.BaseTooltip,null,function(t){return e._visible.set(!1),t.isEmpty()&&e._state.set(o.None),t.map(function(t){return i.createElement(a.F.div,r.__assign({mount:function(n){e._el=n,e._state.set(o.Some(t))}},a.classes(u.tooltip,e._props.view("className"),e._visible.view(function(e){return e?u.visible:u.hidden})),{style:e._props.view("style")}),t.content)}).orNull()})},t.prototype._listenStyles=function(){var e,t=this;this._subs.push(this._state.subscribe(function(n){e&&cancelAnimationFrame(e),t._visible.set(!1),n.fold(function(){return t._props.set(d)},function(n){t._props.set(t._calcProps({alignment:n.alignment,targetRect:n.target.getBoundingClientRect(),elRect:t._el&&t._el.getBoundingClientRect()})),t._isFixed(n.alignment)?t._visible.set(!0):e=requestAnimationFrame(function(){return t._validateFit(n)})})}))},t.prototype._isFixed=function(e){switch(e){case"topCenter":case"topRight":case"topLeft":case"bottomCenter":case"bottomRight":case"bottomLeft":case"left":case"right":return!0;default:return!1}},t.prototype._getHAlign=function(e,t,n){var r=t.right>n.right,i=t.left<n.left;switch(e){case"center":return"Center";case"right":return"Right";case"left":return"Left";case"auto":case"top":case"bottom":default:return r&&i?"Center":r?"Right":"Left"}},t.prototype._getVAlign=function(e,t,n){switch(e){case"top":case"bottom":return e;case"auto":case"center":case"right":case"left":default:return t.top<n.top?"top":"bottom"}},t.prototype._calcProps=function(e){var t=e.alignment,n=e.targetRect,r=e.elRect,i=r?r.height:24,o={fromTop:n.top-i-7,fromMiddle:(n.top+n.bottom-i)/2,fromBottom:n.bottom+7,fromCenter:n.left+n.width/2,fromRight:n.left+n.width/2-12-7,fromLeft:n.left+n.width/2+12+7,fromRightBorder:n.right+7,fromLeftBorder:n.left-7};switch(t){case"auto":case"center":case"top":case"topCenter":return{style:{top:o.fromTop,left:o.fromCenter},className:u.tooltipTopCenter};case"right":return{style:{top:o.fromMiddle,left:o.fromRightBorder},className:u.tooltipMiddleRight};case"topRight":return{style:{top:o.fromTop,left:o.fromRight},className:u.tooltipTopRight};case"left":return{style:{top:o.fromMiddle,left:o.fromLeftBorder},className:u.tooltipMiddleLeft};case"topLeft":return{style:{top:o.fromTop,left:o.fromLeft},className:u.tooltipTopLeft};case"bottom":case"bottomCenter":return{style:{top:o.fromBottom,left:o.fromCenter},className:u.tooltipBottomCenter};case"bottomRight":return{style:{top:o.fromBottom,left:o.fromRight},className:u.tooltipBottomRight};case"bottomLeft":return{style:{top:o.fromBottom,left:o.fromLeft},className:u.tooltipBottomLeft};default:return c.assertNever(t)}},t}(s.BaseComponent);t.DenaliTooltipElement=p},1512:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(14),i=n(3);!function(e){function t(e){switch(e){case"red":return o.red;case"green":return o.green;case"yellow":return o.yellow;default:return o.grey}}function n(e){return function(t){switch(e){case o.red:return t.red;case o.green:return t.green;case o.yellow:return t.yellow;default:return t.fallback}}}var o;!function(e){e[e.red=0]="red",e[e.green=1]="green",e[e.yellow=2]="yellow",e[e.grey=3]="grey"}(o=e.Color||(e.Color={}));e.parse=function(e){return r.Option.of(e).map(function(e){return e.replace(/^<p>/,"").split("<p>").map(function(e){var n=e.match(/<span.*?<\/span><br\/>/g);return n&&i.notEmpty(n)?n.map(function(e){var n=t(i.StringUtils.getFirstWord(i.StringUtils.getFirstMatch(e,/^<span.*?class="(.+?)".*?>/)||"")),o=r.Option.of(i.StringUtils.getFirstMatch(e,/^<span.*?>(.+?): /)),a=i.StringUtils.getFirstMatch(e,/^<span.*?>(?:.+?: )?(.+?)<\/span><br\/>/);return a?{color:n,title:o,text:a}:null}).filter(Boolean):[]}).filter(i.notEmpty)}).flatMap(i.NotEmpty.array)},e.colorMatch=n}(t.AlertExample||(t.AlertExample={}))},1513:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(2),o=n(7),a=n(14),s=n(215),l=n(54),c=n(124),u=n(23),d=n(1696),p=n(6),f=n(36);!function(e){function t(e,t){return{critical:e.critical+t.critical,advanced:e.advanced+t.advanced,unread:e.unread+t.unread}}function n(e){return{critical:-e.critical,advanced:-e.advanced,unread:-e.unread}}function r(e){return e.critical>=0&&e.advanced>=0&&e.unread>=0}e.empty={critical:0,advanced:0,unread:0},e.join=t,e.reverse=n,e.isValid=r}(r=t.DocumentCounters||(t.DocumentCounters={}));var h=function(){function e(e){this._changes=o.Atom.create(e),this.changes=this._changes.skip(1)}return e.prototype._updateValue=function(e,t){this._changes.modify(function(n){return Object.assign({},n,(r={},r[e]=t,r));var r})},Object.defineProperty(e.prototype,"discoverabilityOnExitShown",{get:function(){return this._changes.view("discoverabilityOnExitShown").get()},set:function(e){this._updateValue("discoverabilityOnExitShown",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"checkedPlagiarism",{get:function(){return this._changes.view("checkedPlagiarism").get()},set:function(e){this._updateValue("checkedPlagiarism",e)},enumerable:!0,configurable:!0}),e}(),m=function(){function e(e,t,n,i,l,f,m,g){var v=this;this._docId=e,this._doxInit=t,this._getText=n,this._getStats=i,this._doxApi=l,this._notifications=f,this._enableTrackingOnDownload=m,this._flushText=g,this.saved=new u.Subject,this.checkingState=o.Atom.create("full"),this.asyncChecksState=o.Atom.create({plagiarism:"full"}),this.counters=o.Atom.create(r.empty),this.score=o.Atom.create(a.None),this.recentDocumentStats=o.Atom.create(a.None),this.extraSettings=new h(this._doxInit.meta.settings.extraSettings.getOrElse(c.DoxDocumentSettings.Extra.empty)),this._log=p.Monitoring.Logging.getLogger("model.document"),this.updateContext=function(e){var t=!s.DocumentContext.isEquals(v.context.get(),e);return v.context.set(e),t},this.title=o.Atom.create(t.meta.title),this.context=o.Atom.create(t.meta.settings.context.getOrElse(s.DocumentContext.empty)),this.contextCompleteness=this.context.view(function(e){return 20*["general"!==e.domain,e.goals.size>0,e.audience.nonEmpty(),e.emotion.nonEmpty(),e.style.nonEmpty()].filter(Boolean).length}),this.proofit=new d.DocumentProofitModelImpl(this._doxInit.remoteDocument,this.title)}return Object.defineProperty(e.prototype,"isInitialRevision",{get:function(){return this._doxInit.remoteDocument.isInitialRevision},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"documentText",{get:function(){return this._getText()},enumerable:!0,configurable:!0}),e.prototype.flush=function(){return this._flushText(),this._doxInit.remoteDocument.flush()},e.prototype.downloadOriginal=function(){return i.__awaiter(this,void 0,void 0,function(){var e;return i.__generator(this,function(t){switch(t.label){case 0:return t.trys.push([0,5,,6]),[4,this.flush()];case 1:return t.sent(),f.isFetchBlobDownloadSupported?[4,this._doxApi.downloadOriginal(this._docId,this._enableTrackingOnDownload).then(l.RawFile.saveToFS)]:[3,3];case 2:return t.sent(),[3,4];case 3:this._notifications.show(this._notifications.create.blobDownloadUnsupported()),t.label=4;case 4:return[3,6];case 5:return e=t.sent(),this._handleDownloadError(e),[3,6];case 6:return[2]}})})},e.prototype.downloadProofread=function(){return i.__awaiter(this,void 0,void 0,function(){var e;return i.__generator(this,function(t){switch(t.label){case 0:if(!f.isFetchBlobDownloadSupported)return[3,5];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this._doxApi.downloadProofread(this._docId).then(l.RawFile.saveToFS)];case 2:return t.sent(),[3,4];case 3:return e=t.sent(),this._handleDownloadError(e),[3,4];case 4:return[3,6];case 5:this._notifications.show(this._notifications.create.blobDownloadUnsupported()),t.label=6;case 6:return[2]}})})},e.prototype.generateReport=function(e,t){return i.__awaiter(this,void 0,void 0,function(){var n;return i.__generator(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this._doxApi.generateReport(this._docId,e,t).then(l.RawFile.saveToFS)];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),this._log.error("generateReport failed",n),this._notifications.show(this._notifications.create.error()),[3,3];case 3:return[2]}})})},e.prototype._handleDownloadError=function(e){this._log.error("downloadDocument failed",e);var t={unauthorized:e instanceof c.DoxErrors.UnauthorizedError,notFound:e instanceof c.DoxErrors.DocumentNotFoundError,temporary:e instanceof c.DoxErrors.TooManyRequestsError||e instanceof c.DoxErrors.ConnectionError};t.unauthorized?this._notifications.show(this._notifications.create.unauthorizedError()):t.notFound?this._notifications.show(this._notifications.create.downloadDocumentNotFoundError()):t.temporary?this._notifications.show(this._notifications.create.isTemporaryDownloadError()):this._notifications.show(this._notifications.create.error())},e.prototype.calculateStats=function(){var e=this;return this._getStats().then(function(t){return e.recentDocumentStats.set(a.Some(t)),t})},e}();t.DocumentModelImpl=m;!function(e){var t=function(){function e(){var e=this;this.score=o.Atom.create(a.None),this.title=o.Atom.create(""),this.downloadOriginal=function(){return i.__awaiter(e,void 0,void 0,function(){return i.__generator(this,function(e){return[2,Promise.resolve()]})})},this.downloadProofread=function(){return i.__awaiter(e,void 0,void 0,function(){return i.__generator(this,function(e){return[2,Promise.resolve()]})})},this.documentText="",this.counters=o.Atom.create(r.empty),this.saved=o.Atom.create(!0),this.checkingState=o.Atom.create("idle"),this.asyncChecksState=o.Atom.create({plagiarism:"idle"}),this.calculateStats=function(){return Promise.resolve({})},this.flush=function(){return Promise.resolve()},this.context=o.Atom.create({}),this.contextCompleteness=o.Atom.create(0),this.updateContext=function(){return!1},this.proofit=new d.DocumentProofitModel.Mock,this.extraSettings=new h(c.DoxDocumentSettings.Extra.empty),this.recentDocumentStats=o.Atom.create(a.None),this.generateReport=function(){throw new Error("Method not implemented.")}}return e}();e.Mock=t}(t.DocumentModel||(t.DocumentModel={}))},1516:function(e,t){e.exports={button:"_46480f23-button-button",text:"_8168eb69-button-text",bubble:"_cffb224f-button-bubble",caps:"_186a00b6-button-caps _46480f23-button-button _8168eb69-button-text",round:"_81abaf57-button-round _46480f23-button-button",blue:"_4a4e1f2e-button-blue _8168eb69-button-text _46480f23-button-button _cffb224f-button-bubble",white:"_937bb57a-button-white _46480f23-button-button _cffb224f-button-bubble",groupSticky:"_d8226593-button-groupSticky",grey:"_6ce41b78-button-grey _8168eb69-button-text _46480f23-button-button _cffb224f-button-bubble",flat:"_13eb0b39-button-flat _46480f23-button-button _cffb224f-button-bubble",sidebarFlat:"_912ed3f2-button-sidebarFlat _44f85ed9-typography-header3 _46480f23-button-button",linkBtn:"_88d8386d-button-linkBtn",group:"_035784be-button-group"}},1517:function(e,t){e.exports={pulse:"_d4abed4c-onboarding-pulse",pulseWrapper:"_dc34585d-onboarding-pulseWrapper",header:"_0741dc7e-onboarding-header _e635cd19-typography-p1",description:"_4ef88004-onboarding-description",buttonsList:"_c41c7b5f-onboarding-buttonsList _e635cd19-typography-p1",button:"_3aa909e1-onboarding-button",stepWrapper:"_ae0ce631-onboarding-stepWrapper",triangle:"_b05b29a3-onboarding-triangle",content:"_ba589243-onboarding-content",dicsoverabiltyContent:"_7b8abe30-onboarding-dicsoverabiltyContent _ba589243-onboarding-content",alertIcon:"_ad10dcea-onboarding-alertIcon",closeIconWrapper:"_eac6e66f-onboarding-closeIconWrapper",closeIcon:"_20a5b91c-onboarding-closeIcon",topCenter:"_9b69d218-onboarding-topCenter",topCenterTriangle:"_9a2c4c4f-onboarding-topCenterTriangle",bottomLeft:"_c67cbdd4-onboarding-bottomLeft",bottomLeftTriangle:"_23dba7a6-onboarding-bottomLeftTriangle",bottomRight:"_640ab8a0-onboarding-bottomRight",bottomRightTriangle:"_76e0affb-onboarding-bottomRightTriangle",bottomCenter:"_2ad87f33-onboarding-bottomCenter",bottomCenterTriangle:"_c24946ed-onboarding-bottomCenterTriangle",bottomFlexibleTriangle:"_d1367fe2-onboarding-bottomFlexibleTriangle",right:"_b02e8795-onboarding-right",rightTriangle:"_1a834993-onboarding-rightTriangle",left:"_f3c8f8cd-onboarding-left",leftTriangle:"_cbc468bf-onboarding-leftTriangle",containerWrapper:"_83d55c54-onboarding-containerWrapper",onboardingSpot:"_e3308bde-onboarding-onboardingSpot",containerDiv:"_b08d5f4d-onboarding-containerDiv",editor:"_982004e7-onboarding-editor",discoverabilityOnExit:"_f9e9014d-onboarding-discoverabilityOnExit",discoverabilityOnExitTriangle:"_0c892d5b-onboarding-discoverabilityOnExitTriangle",checkbox:"_0860ddc9-onboarding-checkbox",checkboxText:"_43405ccb-onboarding-checkboxText _8d8a7136-typography-p2",onboardingPopup:"_13539422-onboarding-onboardingPopup"}},1518:function(e,t,n){n(1531),e.exports=n(1552)},1520:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(1570),a=n(7),s=function(){return i.createElement("svg",{className:o.svg,viewBox:"0 0 14 11",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},i.createElement("defs",null,i.createElement("path",{d:"M11.864 16.273a.792.792 0 0 0-1.145 1.094l3.752 3.93 6.839-7.99a.792.792 0 1 0-1.203-1.03l-5.7 6.66-2.543-2.664z",id:"b"}),i.createElement("filter",{x:"-18.2%",y:"-10.8%",width:"136.4%",height:"143%",filterUnits:"objectBoundingBox",id:"a"},i.createElement("feOffset",{dy:"1",in:"SourceAlpha",result:"shadowOffsetOuter1"}),i.createElement("feGaussianBlur",{stdDeviation:".5",in:"shadowOffsetOuter1",result:"shadowBlurOuter1"}),i.createElement("feColorMatrix",{values:"0 0 0 0 0.168627451 0 0 0 0 0.176470588 0 0 0 0 0.219607843 0 0 0 0.7 0",in:"shadowBlurOuter1"}))),i.createElement("g",{transform:"translate(-9 -12)",fillRule:"nonzero",fill:"none"},i.createElement("use",{fill:"#000",filter:"url(#a)",xlinkHref:"#b"}),i.createElement("use",{fill:"#FFF",fillRule:"evenodd",xlinkHref:"#b"})))},l=function(){return i.createElement("svg",{className:o.svg2,viewBox:"0 0 12 9",width:"12",height:"9",xmlns:"http://www.w3.org/2000/svg"},i.createElement("path",{d:"M1.386 4.115L4.561 7.29l5.81-5.81",stroke:"#FFF",strokeWidth:"2",fill:"none",fillRule:"evenodd",strokeLinecap:"round"}))};t.Checkbox=function(e){var n=e.checked,l=e.className,c=e.children,u=e.name;return i.createElement(t.CheckboxBase,{name:u,checked:n,className:l,checkedComponent:function(e){return i.createElement("div",r.__assign({key:"checkbox"},a.classes(o.rectangle)),e&&i.createElement(s,null))}},c)},t.BlueCheckbox=function(e){var n=e.checked,r=e.className,a=e.children,s=e.name;return i.createElement(t.CheckboxBase,{checked:n,name:s,className:r,checkedComponent:function(e){return i.createElement("div",{key:e?"checkbox1":"checkbox2",className:e?o.rectangleFilledBlue:o.rectangle},e&&i.createElement(l,null))}},a)},t.CheckboxBase=function(e){var t=e.checked,n=e.checkedComponent,s=e.className,l=e.children,c=e.name;return i.createElement(a.F.label,r.__assign({},a.classes(o.wrapper,s),{onClick:function(e){return e.stopPropagation()}},c?{"data-name":c+"-checkbox"}:{}),i.createElement(a.F.input,{type:"checkbox",checked:t,onChange:function(e){return t.modify(function(e){return!e})},className:o.inputCheckbox}),t.view(n),i.createElement("div",null,l))}},1521:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(573),s=n(1494),l=n(3),c=n(1717);!function(e){function t(e){return 0===e?"":e>=n?Math.min(Math.trunc(e/n),9)+"k+":String(e)}var n=1e3,u=function(e){var t=e.className,n=e.isChecking,a=e.type,u=e.animateFade,d=void 0===u||u,p=l.Animation.fadeOutState(n),f=p.state,h=p.complete;return i.createElement(o.F.div,r.__assign({},o.classes(c.loader,t),{role:"loader"}),d?f.map(function(e){return"end"===e?i.createElement("div",{"data-name":"checking-complete"}):i.createElement(s.Spinner,{variation:a,size:"100%",className:"fadeOut"===e?c.fadeOut:void 0,onTransitionEnd:h})}):n.map(function(e){return e?i.createElement(s.Spinner,{variation:a,size:"100%"}):i.createElement("div",{"data-name":"checking-complete"})}))},d=function(e){var n=e.name,a=e.theme,u=void 0===a?{}:a,d=e.count,p=e.type,f=void 0===p?"white":p,h=e.suffix,m=void 0===h?"":h;return i.createElement(o.F.div,r.__assign({},o.classes(c.roundCounter,l.RxUtils.mapMaybeObservable(f,s.Spinner.getClassName(c)),u.counterWrapper),{role:"counter"}),i.createElement("svg",{viewBox:"0 0 32 32",className:c.circular},i.createElement("g",null,i.createElement("circle",{r:"15.75",cx:"16",cy:"16"}),i.createElement("text",r.__assign({x:"16",y:"17"},l.DOM.svgVerticalAlignment(),{fontSize:d>=100?14:18,"data-name":n},o.classes(c.counterText,u.counterContent)),t(d),m))))},p=function(e){var n=e.name,a=e.theme,u=void 0===a?{}:a,d=e.count,p=e.type,f=void 0===p?"white":p,h=e.suffix,m=void 0===h?"":h;return i.createElement(o.F.div,r.__assign({},o.classes(c.ovalCounter,l.RxUtils.mapMaybeObservable(f,s.Spinner.getClassName(c)),u.counterWrapper),{role:"counter"}),i.createElement("svg",{viewBox:"0 0 32 20",className:c.circular},i.createElement("rect",{width:"32",height:"20",rx:"10"}),i.createElement("text",r.__assign({x:"16",y:"10.5"},l.DOM.svgVerticalAlignment(),{fontSize:12,"data-name":n},o.classes(c.counterText,u.counterContent)),t(d),m)))};e.Counter=function(e){var t=e.theme,n=void 0===t?{}:t,a=e.count,s=e.type,l=void 0===s?"white":s;return a>=100?i.createElement(p,{theme:n,count:a,type:l}):i.createElement(d,{theme:r.__assign({},n,{counterWrapper:o.classes(n.counterWrapper,c.flexCounter).className}),count:a,type:l})},e.MainMeter=function(e){var t=e.count,n=e.isChecking,s=e.className,l=0===t;return i.createElement("div",r.__assign({},o.classes(c.meter,s)),i.createElement(u,{isChecking:n,type:l?"green":"red"}),0===t?i.createElement(a.Icon.Grammarly,null):i.createElement(d,{count:t,type:"red",name:"toolbar-mistakes"}))},e.LensNavMeter=function(e){var t=e.count,n=e.isChecking;return i.createElement("div",{className:c.lensNavMeter},i.createElement(u,{isChecking:n,type:"red"}),i.createElement(d,{count:t,type:"white",name:"toolbar-mistakes"}))},e.PlagiarismMeter=function(e){var t=e.count,n=e.isChecking,s=e.className;return i.createElement(o.F.div,r.__assign({},o.classes(c.plagiarismMeter,s)),i.createElement(u,{isChecking:n,type:"violet",animateFade:!1}),i.createElement(o.F.div,{className:c.wrapper},t.combineLatest(n).map(function(e){var t=e[0],n=e[1];return 0===t?i.createElement(a.Icon.NotificationInfo,{className:c.plagiarismIcon,key:"icon",width:20}):!n&&i.createElement(p,{count:t,type:"violet",key:"value",suffix:i.createElement("tspan",{fontSize:8,dominantBaseline:"center"},"%")})}).startWith(null)))}}(t.Counters||(t.Counters={}))},1522:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(14),o=n(7),a=n(6),s=n(3),l=n(1465),c=n(1524),u=n(23),d=n(318);!function(e){var t;t||(t={})}(t.CardTransition||(t.CardTransition={}));var p;!function(e){e.initial=function(e){return{from:i.None,transitionId:0,transition:e,incomplete:!0}},e.complete=function(e){return r.__assign({},e,{incomplete:!1})}}(p=t.CardVisualState||(t.CardVisualState={}));var f=function(){function e(e,t,n){var s=this;this._ded=e,this._pageVM=t,this._sidebar=n,this._log=a.Monitoring.Logging.getLogger("CardsViewModelImpl",a.Logging.LogLevel.DEBUG),this._removingCards=new Set,this._subs=[],this._cardsState=o.Atom.create({prev:{},current:{}}),this._cardsStateCurrent=this._cardsState.lens("current"),this.completeTransitionTo=new u.Subject,this.flushTransitionTo=function(){return s._flushCompleteTransition.next()},this._completeTransitionTo=function(e){s._cardsStateCurrent.modify(function(t){return e.reduce(function(e,n){var o=n.card,a=n.transitionId;return i.Option.of(t[o.cardId]).fold(function(){s._log.warn('complete transition for already "unmounted" card with id "'+o.cardId+'"'),delete e[o.cardId]},function(t){t.transitionId!==a?s._log.debug('skip complete transition "'+a+'" for card "'+o.cardId+'". Current transition is "'+t.transitionId+'"'):(s._log.trace('complete transition "'+a+'" for card "'+o.cardId+'", to: "'+t.transition.type+'"'),"removed"===t.transition.type&&s._disposeCard(o),e[o.cardId]=r.__assign({},t,{incomplete:!1}))}),e},r.__assign({},t))})},this.getState=function(e){var t=e.cardId;return s._cardsState.view(function(e){var n=e.prev;return e.current[t]||n[t]||p.initial({type:"added",clockwise:!0})})},this._contextCache=new d.LRUCache(500),this._flushCompleteTransition=new u.Subject,this._subs.push(this._listenCardsUpdate(),this._listenFocusedLensState(),this._processCompleteTransitionBuffered())}return e.prototype.dispose=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},e.prototype.cardScheduledToDispose=function(e){var t=e.cardId;return this._removingCards.has(t)},e.prototype._disposeCard=function(e){this._removingCards.delete(e.cardId)&&this._sidebar.disposeCard(e)},e.prototype._swapCardsState=function(e){this._log.trace("_resetCardsState"),this._cardsState.modify(function(t){return{prev:t.current,current:e}})},e.prototype._transitionToState=function(e,t){return function(n){return e.reduce(function(e,r){var o=r.cardId;return e[o]=i.Option.of(n[o]).filter(function(e){return"removed"!==e.transition.type}).fold(function(){return p.initial(t)},function(e){var n=e.transition,r=e.transitionId;return s.invariant("removed"!==n.type,'Cannot transition "'+o+'" to "'+t.type+'" from terminal state'),s.invariant(n.type!==t.type,'Cannot transition to the same state twice - "'+o+'": "'+n.type+'"'),{transitionId:++r,from:i.Some(n.type),transition:t,incomplete:!0}}),e},r.__assign({},n))}},e.prototype.startTransitionTo=function(e,t){this._log.trace("start transition for: "+(Array.isArray(e)?e.length:e.cardId)+', to: "'+t.type+'" - '+(t.clockwise?"clockwise":"counterclockwise")),this._cardsStateCurrent.modify(this._transitionToState(Array.isArray(e)?e:[e],t))},e.prototype.getContext=function(e){var t=this._contextCache.get(e.id);if(t)return t;var n,r=e.highlightRange,i=r.start,o=r.end;return n=1===e.highlightText.length?this._ded.getContext(i+1,o-1):this._ded.getContext(i,o),this._contextCache.put(e.id,n),n},e.prototype._listenCardsUpdate=function(){var e=this;return this._sidebar.cardEvents.do(function(t){var n=function(t){var n=e._pageVM.focusedCard.get().map(function(e){return e.cardId}).orNull();e._removingCards.add(t.cardId),n!==t.cardId&&e.startTransitionTo(t,{type:"removed",clockwise:!0})};switch(t.kind){case"cards_added":e.startTransitionTo(t.cards,{type:"added",clockwise:!0});break;case"cards_removed":t.cards.forEach(n);break;default:s.assertNever(t)}}).catch(this._log.handler("listenCardsUpdate exception").error).retry().subscribe()},e.prototype._listenFocusedLensState=function(){var e=this;return this._pageVM.state.map(l.LensState.mapper(function(e){var t=e.currentLens;return i.Some({id:t.id,card:t.card,visibleCards:t.visibleCards})},function(e){var t=e.currentLens;return t.card.map(function(e){return{id:t.id,card:e,visibleCards:t.visibleCards}})})).distinctUntilChanged(function(e,t){return i.Option.map2(e,t,function(e,t){return e.id===t.id}).getOrElse(!1)}).subscribe(function(t){e._swapCardsState(e._transitionToState(t.fold(function(){return[]},function(e){return e.visibleCards.filter(function(t){return e.card.cardId!==t.cardId})}),{type:"rendered",clockwise:!0})({}))})},e.prototype._processCompleteTransitionBuffered=function(){var e=u.Observable.interval(100).startWith(0).merge(this._flushCompleteTransition);return this.completeTransitionTo.buffer(e).filter(s.notEmpty).subscribe(this._completeTransitionTo)},e}();t.CardsViewModelImpl=f;!function(e){var t=function(){function e(e,t){void 0===e&&(e="rendered"),void 0===t&&(t=new c.DEd.Mock);var n=this;this._initialType=e,this._ded=t,this.cardsStateMap=o.Atom.create({}),this.animate=o.Atom.create(!0),this.clockwise=o.Atom.create(!0),this.toggleAnimations=function(){return n.animate.modify(function(e){return!e})},this.startTransitionTo=function(e,t){return n.cardsStateMap.modify(function(n){return(Array.isArray(e)?e:[e]).reduce(function(e,r){var o=r.cardId;return e[o]=i.Option.of(n[o]).map(function(e){var n=e.transitionId,r=e.transition,o=e.incomplete;return{transitionId:++n,from:i.Option.of(r.type),transition:t,incomplete:o}}).getOrElse({transitionId:0,from:i.None,transition:t,incomplete:!0}),e},r.__assign({},n))})},this.completeTransitionTo=new u.Subject,this.flushTransitionTo=s.noop,this.getState=function(e){var t=e.cardId;return n.cardsStateMap.view(function(e){return e[t]||p.initial({type:n._initialType,clockwise:!1})}).view(function(e){return{transitionId:e.transitionId,from:e.from.orElse(i.Option.of("rendered")),transition:{type:e.transition.type,clockwise:n.clockwise.get()},incomplete:n.animate.get()}})}}return e.prototype.getContext=function(e){var t=e.highlightRange,n=t.start,r=t.end;return 1===e.highlightText.length?this._ded.getContext(n+1,r-1):this._ded.getContext(n,r)},e.prototype.cardScheduledToDispose=function(e){throw new Error("Method not implemented.")},e.prototype.dispose=function(){throw new Error("Method not implemented.")},e}();e.Mock=t}(t.CardsViewModel||(t.CardsViewModel={}))},1523:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(23),o=n(14),a=n(7),s=n(6),l=n(1464),c=n(1646),u=n(1495),d=n(1463),p=n(3),f=function(){function e(e,t,n,c,f){void 0===c&&(c=!1),void 0===f&&(f=a.Atom.create(p.DOM.Rect.empty));var h=this;this._ded=e,this._pageVM=t,this._alertList=n,this._useHighHighlights=c,this._editorViewport=f,this._marksMap=new Map,this._log=s.Monitoring.Logging.getLogger("MarksViewModelImpl",s.Logging.LogLevel.DEBUG),this._subs=[],this._focusedLens=this._pageVM.state.view("currentLens"),this._lockMarkUpdate=a.Atom.create(!1),this.getMarkAlert=function(e){var t=e.id;return o.Option.of(h._marksMap.get(t)).filter(function(e){return e.not(u.MarkAlertVisualState.disposed)})},this.getVisibleMarkAlert=function(e){var t=e.id,n=h._pageVM.filterKit.get().flatMap(function(e){return e.filter});return h._getMarkAlert({id:t}).filter(function(e){return n.forAll(function(t){return t(e.alert)})})},this._getVisibleMarkAlertByMarkId=function(e){var t=h._pageVM.filterKit.get().flatMap(function(e){return e.filter}),n=d.Alert.fromRangeIdToAlertId(e);return h._getMarkAlert({id:n}).filter(function(e){return t.forAll(function(t){return t(e.alert)})})},this.highlightedAlert=a.Atom.create(o.None),this.highlightedAlertBuffered=new i.Subject,this._marksToMarkAlertArray=function(e){return e.map(function(e){return e.map(function(e){return h._getVisibleMarkAlertByMarkId(e.id)}).filter(function(e){return e.nonEmpty()}).map(function(e){return e.get()}).sort(function(e,t){var n=e.alert,r=t.alert;return l.Lens.comparator({type:n.alertType,priority:n.lensPriority},{type:r.alertType,priority:r.lensPriority})})})},this.alertClicked=this._ded.activeMarks.switchMap(p.RxUtils.Scheduler.rafScheduler).map(this._marksToMarkAlertArray).withLatestFrom(this._focusedLens).map(function(e){var t=e[0],n=e[1];return t.mapN(function(e){return e.find(function(e){return e.alert.lensId===n.id})}).orElseL(function(){return t.mapN(function(e){return e[0]})}).filter(function(e){var t=void 0!==h._alertList.getAllAlerts()[e.alert.id];return t||h._log.error("Mark Alerts and Alert List not synced",{ma:e}),t})}).distinctUntilChanged(function(e,t){return p.isOptionsEq(e,t,function(e,t){return e.alert.id===t.alert.id})}),this.alertHovered=this._ded.hoveredMarks.switchMap(p.RxUtils.Scheduler.rafScheduler).map(function(e){return h._marksToMarkAlertArray(e).mapN(function(e){return e[0]})}),this._alertsChangeWorker=new p.Worker(this._updateMarksClasses,new p.Buffer.LazyPredicateUniq(function(e){return e.pending}),this._asyncRunner(this._lockMarkUpdate,i.Observable.timer(50))),this._priorityAlertsChangeWorker=new p.Worker(this._updateMarksClasses,new p.Buffer.LazyPredicateUniq(function(e){return e.pending}),this._asyncRunner(this._lockMarkUpdate,p.RxUtils.Scheduler.inRic(i.Observable.of(void 0),50))),this._getMarkAlert=function(e){var t=e.id;return o.Option.of(h._marksMap.get(t)).filter(function(e){return e.not(u.MarkAlertVisualState.disposed)})},this._filteredAlerts=this._pageVM.filterKit.view(function(e){var t=e.flatMap(function(e){return e.filter}),n=h._alertList.getAllAlertsAsArray().reduce(function(e,n){return t.map(function(e){return e(n)}).getOrElse(!0)&&(e[n.id]=n),e},{});return{filter:t,alerts:n}}),this._updateMarks=function(e){return h._ded.changeMarks(e)},this._invisibleActiveMark=a.Atom.create(o.None),this.isActiveMarkInvisible=function(e){return h._invisibleActiveMark.view(function(t){return t.contains(e)})},this._listenVisibleActiveMark=function(){return i.Observable.combineLatest(h._pageVM.focusedAlert.switchMap(p.RxUtils.Scheduler.rafScheduler).map(p.OptionUtils.flatMap(function(e){return h.getVisibleMarkAlert(e)})).switchMap(p.RxUtils.toOptionValueOnly),h._editorViewport,h._ded.scrollPosition,function(e,t){var n=e.mark,r=e.alert;try{return n.isEmpty()&&h._log.warn("[mark-alert-get-mark] Active alert state mark is None"),n.map(function(e){return{mark:e.viewportRect[0],viewport:t,id:r.id}})}catch(e){return h._log.warn("Unexpected active alert state",e),o.None}}).map(function(e){return e.filter(function(e){var t=e.mark,n=e.viewport;return t.top>n.bottom||t.bottom<n.top}).map(function(e){return e.id})}).subscribe(p.RxUtils.toAtom(h._invisibleActiveMark))},this._subs.push(this._listenMarksState(),this._listenAppliedAlerts(),this._listenHighlightState(),this._listenVisibleActiveMark(),this._listenHighlightedAlertBuffered(),this._listenScrollUpdate()),p.registerDebugHelper("updateRange",function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=t.map(function(e){return h._alertList.getAllAlerts()[e]});i.forEach(function(t){t.enqueueRawAlertForUpdate(r.__assign({},t._raw,{highlightBegin:t.highlightRange.start+e,highlightEnd:t.highlightRange.end+e,begin:t.replaceRange.start+e,end:t.replaceRange.end+e})),h._marksMap.get(t.id).scheduleUpdate()}),h._updateMarksClasses(i.map(function(e){return h._marksMap.get(e.id)}))})}return e.prototype.dispose=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},e.prototype.focusMark=function(e,t){var n=this;e.canBeChanged()&&(e.scheduleApply(u.MarkAlertVisualState.highlighted),this._priorityApply(e)),t.filter(function(e){return e===d.AlertActionSource.sidebar}).forEach(function(){n._moveCursorToHighlight(e.mark.map(function(e){return e.range}),"start")})},e.prototype.unfocusMark=function(e,t){var n=this;e.filter(function(e){return t.forAll(function(t){return t.id!==e.alert.id})&&!e.isOrWillBe(u.MarkAlertVisualState.hidden)&&e.canBeChanged()}).forEach(function(e){n._priorityApply(e.scheduleApply(u.MarkAlertVisualState.active))})},e.prototype.ensureAlertMarksInViewport=function(e,t,n){var r=this;this.getVisibleMarkAlert(e).forEach(function(e){return e.mark.fold(function(){return r._log.warn("[mark-alert-get-mark] Cannot ensureMarkAlertInViewport, because mark is None")},function(e){return r._ded.scrollToMark(e,{animate:n?u.MarkAlertVisualState.initial:"none",paddingTop:t})})})},e.prototype._listenHighlightedAlertBuffered=function(){return this.highlightedAlertBuffered.debounceTime(100).subscribe(p.RxUtils.toAtom(this.highlightedAlert))},e.prototype.getFirstMark=function(){var e=this;return this._alertList.alertEvents.filter(function(e){return"alert_added"===e.kind}).mapTo(p.RxUtils.voidValue).startWith(p.RxUtils.voidValue).debounceTime(500).first().switchMap(function(t){return Array.from(e._marksMap.values()).reduce(function(e,t){return e.map(function(e){return t.alert.alertType===l.Lens.Type.Critical&&e.alert.highlightRange.start>t.alert.highlightRange.start?t:e}).orElseL(function(){return t.alert.alertType===l.Lens.Type.Critical?o.Some(t):o.None})},o.None).fold(function(){return i.Observable.of(o.None)},function(t){var n=t.alert.id;return e._alertList.alertEvents.filter(function(e){return"alert_removed"===e.kind&&e.alerts.some(function(e){return e.id===n})||"alert_applied"===e.kind&&e.alert.id===n}).first().mapTo(o.None).startWith(t.mark)})})},e.prototype._asyncRunner=function(e,t){return function(n){return e.switchMap(p.RxUtils.orEmptyRight(t)).first().subscribe(n)}},e.prototype._priorityApply=function(e){this._log.trace("schedule priority alert "+e.id+" to "+e.scheduledState),this._priorityAlertsChangeWorker.put([e])},e.prototype._updateMarksClasses=function(e){var t=e.filter(function(e){return e.pending}),n=t[0],r=t.slice(1);n&&n.applyWith(r)},e.prototype._moveCursorToHighlight=function(e,t){var n=this;e.fold(function(){n._log.warn("[mark-alert-get-mark] Cannot move cursor to highlight, because mark.range is None",{to:t})},function(e){n._ded.getCursor(!0).forAll(function(t){var n=t.index;return 0===t.length&&(n<e.start||n>e.end)})&&n._ded.setCursor(e[t],0)})},e.prototype._listenMarksState=function(){var e=this,t=function(t,n){void 0!==t&&p.notEmpty(t)&&(e._log.trace("Schedule alerts "+t.map(function(e){return e.id})+" to "+n),e._alertsChangeWorker.put(t.map(function(e){return e.scheduleApply(n)})))},n=function(e){return r.__assign({activeAlerts:[],removedAlerts:[],hiddenMarkAlerts:[]},e)},o=function(e){return e.is(u.MarkAlertVisualState.initial)||e.isOrWillBe(u.MarkAlertVisualState.hidden)||e.isOrWillBe(u.MarkAlertVisualState.active)||e.isOrWillBe(u.MarkAlertVisualState.faded)},a=function(e){return"alert_added"===e.kind||"alert_removed"===e.kind};return i.Observable.merge(this._filteredAlerts.map(function(t){var r=t.alerts;return n({hiddenMarkAlerts:Array.from(e._marksMap.values()).filter(function(e){return void 0===r[e.alert.id]&&e.not(u.MarkAlertVisualState.applied)}),activeAlerts:p.ObjectUtils.toArray(r)})}),this._alertList.alertEvents.filter(a).withLatestFrom(this._filteredAlerts).map(function(t){var r=t[0],i=t[1].filter;switch(r.kind){case"alert_added":return n({activeAlerts:i.map(function(e){return r.alerts.filter(e)}).getOrElse(r.alerts)});case"alert_removed":var o=r.alerts.filter(function(t){var n=e._marksMap.has(t.id);return n||t.dispose(),n});return n({removedAlerts:o});default:return p.assertNever(r)}})).do(function(n){var r=n.activeAlerts,i=n.removedAlerts,a=n.hiddenMarkAlerts;if(p.notEmpty(i)){var s=i.map(function(t){var n=t.id,r=e._marksMap.get(n);return e._marksMap.delete(n),r});t(s,u.MarkAlertVisualState.disposed)}if(p.notEmpty(r)){var s=r.map(function(t){if(e._marksMap.has(t.id))return e._marksMap.get(t.id);var n=new c.MarkAlertII(t,e._updateMarks,e._useHighHighlights);return e._marksMap.set(t.id,n),n}).filter(o);t(s,u.MarkAlertVisualState.active)}return t(a,u.MarkAlertVisualState.hidden),function(){e._alertsChangeWorker.shutdown()}}).catch(this._log.handler("_listenMarksState exception").error).retry().subscribe()},e.prototype._listenHighlightState=function(){var e=this;return this.highlightedAlert.scan(function(e,t){return{next:t,prev:e.next}},{next:o.Option.empty()}).withLatestFrom(this._pageVM.focusedAlert).map(function(t){var n=t[0],r=n.prev,i=n.next,o=t[1];return{prev:r.flatMap(e._getMarkAlert).filter(function(e){return o.forAll(function(t){return t.id!==e.alert.id})}),next:i.flatMap(e._getMarkAlert)}}).withLatestFrom(this._focusedLens).subscribe(function(t){var n=t[0],r=n.prev;n.next.filter(function(e){return e.canBeChanged()}).forEach(function(t){return e._priorityApply(t.scheduleApply(u.MarkAlertVisualState.highlighted))}),r.filter(function(e){return e.canBeChanged()&&!e.isOrWillBe(u.MarkAlertVisualState.hidden)}).forEach(function(t){return e._priorityApply(t.scheduleApply(u.MarkAlertVisualState.active))})})},e.prototype._listenAppliedAlerts=function(){var e=this,t=function(e){return"alert_applied"===e.kind};return this._alertList.alertEvents.filter(t).map(function(t){var n=t.alert;return o.Option.of(e._marksMap.get(n.id))}).switchMap(p.RxUtils.toOptionValueOnly).do(function(t){e._moveCursorToHighlight(t.mark.map(function(e){return e.range}),"end"),t.apply(u.MarkAlertVisualState.applied)}).catch(this._log.handler("_listenAppliedAlerts exception").error).retry().subscribe()},e.prototype._listenScrollUpdate=function(){var e=this._pageVM.state.view(function(e){return e.currentLens.id});return i.Observable.combineLatest(p.RxUtils.toBooleanWithDebounce(this._ded.scrollPosition,150),p.RxUtils.toBooleanWithDebounce(e,150)).combineLatest(function(e){return e.some(function(e){return!0===e})}).subscribe(p.RxUtils.toAtom(this._lockMarkUpdate))},e}();t.MarksViewModelImpl=f;!function(e){var t=function(){function e(){this.isActiveMarkInvisible=function(){return a.Atom.create(!1)},this.alertHovered=a.Atom.create(o.None),this.alertClicked=a.Atom.create(o.None)}return e.prototype.ensureAlertMarksInViewport=function(){throw new Error("Method not implemented.")},e.prototype.getVisibleMarkAlert=function(e){throw new Error("Method not implemented.")},e.prototype.getMarkAlert=function(e){throw new Error("Method not implemented.")},e.prototype.getFirstMark=function(){throw new Error("Method not implemented.")},e.prototype.focusMark=function(e,t){throw new Error("Method not implemented.")},e.prototype.unfocusMark=function(e,t){throw new Error("Method not implemented.")},e.prototype.dispose=function(){throw new Error("Method not implemented.")},e}();e.Mock=t}(t.MarksViewModel||(t.MarksViewModel={}))},1524:function(e,t,n){"use strict";function r(e){void 0===e&&(e="");var t=document.createElement("input");return t.setAttribute("type","file"),t.setAttribute("accept",e),t}function i(e,t,n){void 0===t&&(t=""),void 0===n&&(n={typeOrPasteText:"",upload:""});var r=document.createElement("div"),i=document.createElement("label"),o=n.upload.split(" "),a=o[0],s=o.slice(1);return i.textContent=a,i.appendChild(e),r.className=t,r.textContent=n.typeOrPasteText+" ",r.appendChild(i),r.appendChild(document.createTextNode(" "+s.join(" "))),r}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),a=n(1472),s=n(23),l=n(14),c=n(7),u=n(6),d=n(3),p=n(75),f=n(1525),h=n(1653),m=n(1657),g=n(1655),v=n(1654),_=n(1656),b=n(1477),y=n(157),w=n(587),E=n(1583),k=/[\t ,:"”\(\)\[\]\{\}]?((\w[\w\-’']*[\t ,:"”\(\)\[\]\{\}]+)?\w[\w\-’']*[\t ,:"”\(\)\[\]\{\}]*)$/,x=/^[\t ,:"”\(\)\[\]\{\}]*\w[\w\-’']*([\t ,:"”\(\)\[\]\{\}]+[\w\-’']+)?/,S=60,C=30;a.register("themes/denali",m.DenaliTheme,!0),a.register("modules/clipboard",h.DenaliClipboard,!0),a.register("modules/keyboard",g.DenaliKeyboard,!0),a.register("modules/history",v.DenaliHistory,!0),a.register("modules/marks",_.MarksManager,!0);var M=function(){function e(e){void 0===e&&(e={});var t=this;this._options=e,this._log=u.Monitoring.Logging.getLogger("DEd"),this._freezeFocus=new w.RxSemaphore.Impl("freezeFocus",this._options.freezeFocusFeature?w.RxSemaphore.everyTrue:function(){return!1}),this._editorEl=document.createElement("div"),this._scrollEl=new s.BehaviorSubject(l.None),this._scrollTo=new s.Subject,this._textLength=0,this._outgoingChanges=void 0,this.flushChanges=function(){if(void 0!==t._outgoingChanges){t._log.trace("flushChanges");var e=t._outgoingChanges;t._outgoingChanges=void 0,void 0!==t._changesSyncTimer&&(clearTimeout(t._changesSyncTimer),t._changesSyncTimer=void 0),e.isEmpty||t.changes.next(e)}},this._flush=function(){t.flushChanges(),t.changes.next(y.Change.flush())},this.changes=new s.Subject,this.contentUpdated=new s.Subject,this.activeWord=new s.BehaviorSubject(l.Option.none()),this.cursorPosition=new s.BehaviorSubject(l.Option.none()),this.clickedWord=new s.Subject,this.scrollPosition=new s.BehaviorSubject(0),this.viewportRange=new s.BehaviorSubject(b.Range.empty),this.ongoingSelection=c.Atom.create(!1),this._viewportPadding=new s.BehaviorSubject(l.None),this._scrollElRect=new s.BehaviorSubject(l.None),this._text=null,this.getText=function(){return null===t._text&&(t._text=t.quill.getText()),t._text},this.getTextLength=function(){return t._textLength},this.getContents=function(){return y.Change.res(y.DeltaUtils.cleanAttrs(t.quill.getContents()))},this.getContext=function(e,n){var r=t.getText(),i=r.slice(Math.max(0,e-S),e).match(k),o=r.slice(n,Math.min(n+C,r.length)).match(x);return{prev:l.Option.of(i&&t._normalizePrevContext(i[1])),next:l.Option.of(o&&o[0])}},this.setCursor=function(e,n,r){void 0===n&&(n=0),void 0===r&&(r={}),t._ensureScrollPosition(function(){t.quill.setSelection(Math.max(e,0),n,r.source||a.sources.API)}),r.focus&&t.quill.focus()},this._focusTitle=function(){return t._ensureScrollPosition(function(){return t._title.focus()})},this.scrollToTitle=function(){t._focusTitle(),t._scrollTo.next({offset:0,animate:"initial"})},this._getScroll=function(){return d.invariant(t._scrollEl.getValue().nonEmpty(),"DEd should be attached"),t._scrollEl.getValue().get().scrollTop},this._setScroll=function(e){return d.invariant(t._scrollEl.getValue().nonEmpty(),"DEd should be attached"),t._scrollEl.getValue().get().scrollTop=e},this._ensureScrollPosition=function(e){var n=t.scrollPosition.getValue();e(),t._setScroll(n)},this.extendSelectionTo=function(e,n){return t._getNativeCursorByPosition(e,n).map(function(e){var t=e.node,n=e.offset,r=window.getSelection();r.focusNode===t&&r.focusOffset===n||(r.anchorNode===t?r.setBaseAndExtent(r.anchorNode,r.anchorOffset,t,n):r.extend(t,n))}).recover(function(e){throw t._log.error("Cannot get possible cursor position",e),e})},this._getNativeCursorByPosition=function(e,n){var r=function(e,t,n){var r=document.querySelector("[data-name="+n+"]");r||(r=document.createElement("span"),r.setAttribute("data-name",n),document.body.appendChild(r)),r.style.width="5px",r.style.height="5px",r.style.background="red",r.style.position="fixed",r.style.left=e+"px",r.style.top=t-5+"px",r.style.zIndex="100000"},i=function(e,t){return l.Try.of(function(){if("caretPositionFromPoint"in document){var n=document.caretPositionFromPoint(e,t);return{node:n.offsetNode,offset:n.offset}}if(document.caretRangeFromPoint){var n=document.caretRangeFromPoint(e,t);return n?{node:n.startContainer,offset:n.startOffset}:{node:document.elementFromPoint(e,t),offset:0}}throw new Error("Browser doesn't support range API")})},o=function(e){return e.lastChild?o(e.lastChild):e},a=function(e){return e.firstChild?a(e.firstChild):e};return l.Try.of(function(){return t.viewport.get()}).flatMap(function(s){var l=e>=s.right?s.right-1:e<=s.left?s.left+1:e,c=n<=s.top?s.top+1:n>=s.bottom?s.bottom-1:n;return t._log.isEnabled(u.Logging.LogLevel.TRACE)&&r(l,c,"top"),i(l,c).map(function(e){var n=e.node,r=e.offset;if(d.DOM.isParent(t.quill.root,n))return{node:n,offset:r};if(c<=s.top+1){return{node:a(t.quill.root),offset:0}}var i=o(t.quill.root);return{node:i,offset:i.textContent?i.textContent.length:0}})})};var n=e.classes||{},o=e.placeholder,p=r(o&&o.uploadInputAccept);this._allowNavigationTo=e.allowNavigationTo||function(){return!1},this._shouldFocusEditor=e.shouldFocusEditor||function(){return!1},this._withPlaceholderClass=n.withPlaceholder||"",this.quill=new a(this._editorEl,{modules:{toolbar:!1,clipboard:{className:E.editorClipboard,maxAllowedTextLength:1e5,lengthExceededCallback:function(){return alert("Oops, Document size exceeded!")},flush:this._flush},history:{userOnly:!0,flush:this._flush},marks:{scrollPositionChanged:this.scrollPosition.distinctUntilChanged().mapTo(d.RxUtils.voidValue).skip(1),contentUpdated:this.contentUpdated,scrollContainer:this._scrollEl,ongoingSelection:this.ongoingSelection}},theme:"denali",classes:{editor:d.DOM.classes(E.editor,n.editor),editorContainer:n.editorContainer,scrollWrap:n.scrollWrap}}),this.quill.addContainer(i(p,n.placeholder,o&&o.strings)),this._marker=this.quill.getModule("marks"),this._history=this.quill.getModule("history"),this._clipboard=this.quill.getModule("clipboard"),this.textChangedAfterPaste=this._clipboard.textChangedAfterPaste,this.activeMarks=this._marker.activeMarks,this.hoveredMarks=this._marker.hoveredMarks,this.changeMarks=function(e){return t.flushChanges(),t._marker.changeMarks(e)},this._ensurePlaceholder(),this._quillEditorChange=f.toQuillObservable(this.quill).share(),this.scrollPercentage=this.scrollPosition.combineLatest(this._scrollEl.combineLatest(s.Observable.merge(s.Observable.fromEvent(window,"resize"),this._quillEditorChange.filter(f.filterTextChange)).debounceTime(500).startWith(d.RxUtils.voidValue),function(e){return e}).map(function(e){return e.flatMap(function(e){var t=e.scrollHeight-e.clientHeight;return t>0?l.Some(t):l.None})}).distinctUntilChanged(function(e,t){return e.equals(t)})).map(function(e){var t=e[0];return e[1].map(function(e){return t/e})}).distinctUntilChanged(function(e,t){return e.equals(t)}).shareReplay(1);var h=this._quillEditorChange.filter(f.filterSelectionChange).map(function(e){return e.range});this._subs=[this._quillEditorChange.filter(f.filterTextChange).subscribe(function(e){var n=e.delta,r=e.source;void 0!==n.ops&&(t._text=null,r===a.sources.USER&&t._pushDelta(n),t._setTextLength(t._textLength+y.DeltaUtils.calcDiffLength(n)))}),this._quillEditorChange.filter(f.filterTextChange).filter(function(e){return e.delta.ops.some(function(e){return!e.retain})}).mapTo(void 0).subscribe(this.contentUpdated),h.map(function(e){return l.Option.of(e).map(function(e){return{index:e.index,length:e.length}})}).subscribe(this.cursorPosition),h.map(l.Option.of).map(function(e){return e.filter(function(e){return 0===e.length})}).map(function(e){return e.flatMap(function(e){return f.getWordAt(t.quill.getText(),e)}).filter(function(e){return""!==e.value})}).distinctUntilChanged(function(e,t){return e.equals(t)}).subscribe(this.activeWord),s.Observable.merge(s.Observable.fromEvent(this.quill.root,"mousedown",{passive:!0}).mapTo(!0),s.Observable.fromEvent(document,"mouseup",{passive:!0}).mapTo(!1),s.Observable.fromEvent(document,"dragend",{passive:!0}).mapTo(!1),s.Observable.fromEvent(document,"click",{passive:!0}).mapTo(!1)).switchMap(d.choose(s.Observable.fromEvent(document,"mousemove",{passive:!0}).auditTime(50).filter(function(){return!window.getSelection().isCollapsed}).first().mapTo(!0),s.Observable.of(!1))).subscribe(d.RxUtils.toAtom(this.ongoingSelection))],o&&this._subs.push(s.Observable.fromEvent(p,"change").subscribe(function(e){var t=e.target;return t.files&&o.upload(t.files)}))}return e.prototype._pushDelta=function(e){void 0===this._outgoingChanges?this._outgoingChanges=y.Change.delta(y.DeltaUtils.cleanAttrs(e),this._textLength):this._outgoingChanges.delta=this._outgoingChanges.delta.compose(y.DeltaUtils.cleanAttrs(e));var t=y.DeltaUtils.calcAmountLength(e);!this._outgoingChanges.isEmpty&&(t>100||this._textLength-t<=1||void 0!==e.ops.find(function(e){return f.isBreakWordInsert(e)||f.isMarkChangeOperation(e)})||this.activeMarks.getValue().nonEmpty())?this.flushChanges():(void 0!==this._changesSyncTimer&&clearTimeout(this._changesSyncTimer),this._changesSyncTimer=setTimeout(this.flushChanges,1500))},e.prototype._setTextLength=function(e){this._textLength=e,this.viewportRange.next(new b.Range(0,e)),this._ensurePlaceholder()},e.prototype.attach=function(e,t,n,r){var i=this;if(this._wrapper)throw new Error("Editor already attached");this._wrapper=e,this._scrollEl.next(l.Some(t)),this._title=n,e.appendChild(this._editorEl),this._textLength?this.setCursor(0,0,{focus:!0}):this._title.focus(),d.registerDebugHelper("dedGetText",this.getText),d.registerDebugHelper("dedSetCursor",this.setCursor),d.registerDebugHelper("dedType",function(e){i.flushChanges(),i.pushChanges(y.Change.ins(i.getCursor().fold(function(){return 0},function(e){return e.index}),e,i.getText().length),"user")}),d.registerDebugHelper("dedQuill",this.quill),d.registerDebugHelper("ded",this);var o=function(e){void 0===e&&(e=!1),i._ensureScrollPosition(function(){var t=i.cursorPosition.getValue().getOrElse({index:0}).index;i._clearSelection(),i.setCursor(t,0,{source:a.sources.SILENT,focus:e})})},c=s.Observable.fromEvent(this.quill.root,"blur").filter(function(e){return e.relatedTarget!==i._title&&!i._allowNavigationTo(e.relatedTarget)}).observeOn(s.Scheduler.asap).do(function(){return o()}),u=s.Observable.fromEvent(this._title,"blur").filter(function(e){return e.relatedTarget!==i.quill.root&&!i._allowNavigationTo(e.relatedTarget)}).observeOn(s.Scheduler.asap).do(function(e){return i._shouldFocusEditor(e.relatedTarget)?o(!0):i._focusTitle()});this._subs.push(this._freezeFocus.state.switchMap(d.RxUtils.Scheduler.rafScheduler).do(function(e){return e?o():i.quill.blur()}).switchMap(function(e){return e?s.Observable.merge(c,u):s.Observable.empty()}).catch(function(e){return i._log.warn("unexpected exception in freezeFocus",e),s.Observable.empty()}).subscribe(),s.Observable.fromEvent(this.quill.root,"mouseup").map(function(e){return{clicks:e.detail,range:l.Option.of(i.quill.getSelection())}}).map(function(e){var t=e.clicks;return e.range.flatMap(function(e){return f.getWordAt(i.quill.getText(),e)}).filter(function(e){return""!==e.value}).map(function(e){return new b.ClickedWord(e,t)})}).merge(s.Observable.fromEvent(this.quill.root,"blur").delay(200).mapTo(l.None)).subscribe(this.clickedWord),this._scrollTo.switchMap(function(e){switch(e.animate){case"none":return s.Observable.of(e.offset);case"fast":return d.Animation.createAnimationObservable(i._getScroll(),e.offset,100);case"initial":return d.Animation.createAnimationObservable(i._getScroll(),e.offset,200);default:return d.assertNever(e.animate)}}).subscribe(function(e){return i._setScroll(e)}),s.Observable.fromEvent(this._title,"keydown").filter(function(e){var t=e.target;return 13===e.which||40===e.which||39===e.which&&t.selectionStart===t.selectionEnd&&t.selectionEnd===t.value.length}).subscribe(function(e){i.setCursor(0,0,{source:a.sources.USER}),e.preventDefault()}),this._scrollEl.switchMap(d.RxUtils.toOptionValueOnly).switchMap(function(e){return s.Observable.fromEvent(e,"scroll",function(){return i._getScroll()})}).subscribe(this.scrollPosition),s.Observable.combineLatest(this._quillEditorChange.filter(f.filterTextChange).filter(function(e){return e.source===a.sources.USER}),this._scrollEl.switchMap(d.RxUtils.toOptionValueOnly)).subscribe(function(e){var t=e[1];requestAnimationFrame(function(){var e=i._getCursorRect();if(e){var n=e.top+e.height,r=t.getBoundingClientRect(),o=.7*Math.max(r.top+r.height);n>o&&i._scrollTo.next({offset:i._getScroll()+Math.round(n-o),animate:"initial"})}})}),s.Observable.combineLatest(this._scrollEl.switchMap(d.RxUtils.toOptionValueOnly),this._history.changed).subscribe(function(e){var t=e[0];return requestAnimationFrame(function(){var e=i._getCursorRect();if(e){var n=t.getBoundingClientRect();(e.top<n.top||e.top>n.bottom)&&i._scrollTo.next({offset:i._getScroll()+Math.round(e.top-n.top-n.height/2),animate:"none"})}})}),this._scrollEl.switchMap(function(e){return e.fold(function(){return s.Observable.of(l.Option.empty())},function(e){return s.Observable.fromEvent(window,"resize").map(function(){return e.getBoundingClientRect()}).startWith(e.getBoundingClientRect()).map(function(e){return l.Some(e)})})}).subscribe(function(e){return i._scrollElRect.next(e)}),r?r.subscribe(function(e){return i._viewportPadding.next(l.Some(e))}):p.Subscription.EMPTY)},e.prototype.dispose=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[],this._marker.dispose(),this.quill.emitter.removeAllListeners()},e.prototype.pushChanges=function(e,t){var n=this;this._log.trace("pushChanges"),y.Change.isFlush(e)?this.flushChanges():y.Change.isReset(e)?(this._outgoingChanges=void 0,this.setContents(e)):(d.invariant(void 0===this._outgoingChanges,"There should be no outgoing changes in the editor when pushChanges() is called. Use flush()"),e.prevLen!==this._textLength&&this._log.error("Incoming change for a wrong text len, expected "+this._textLength+", incoming "+e.prevLen),this._ensureSelection(function(){return n.quill.updateContents(e.delta,t)}))},e.prototype._normalizePrevContext=function(e){var t=e.replace(/\s+/g," ");if(t.length>20){for(var n=t.length-20,r=n,i=n+3;r<i;r++)if(!t[r].match(/[\w\-’']/))return t.slice(r+1);return"…"+t.slice(n+1)}return t},e.prototype.setContents=function(e){var t=f.normalizeCRLF(e);t.isEmpty||this.changes.next(t);var n=e.delta.compose(t.delta),r=y.DeltaUtils.calcDiffLength(n);this.quill.setContents(y.DeltaUtils.cleanAttrs(n),"api"),this._setTextLength(r)},e.prototype.getCursor=function(e){return l.Option.of(this.quill.getSelection(e))},e.prototype.scrollToMark=function(e,t){void 0===t&&(t={animate:"none",paddingTop:0});var n=t.animate||"none",r=this._getScrollTop(),i=this._getMarkRect(e);this._scrollTo.next({offset:this._getScroll()+i.top-(t.paddingTop?t.paddingTop:r),animate:n})},e.prototype.undo=function(){this._history.undo()},e.prototype.redo=function(){this._history.redo()},e.prototype.dontFreezeWhen=function(e,t){return this._options.freezeFocusFeature?this._freezeFocus.watch(d.RxUtils.invert(e),t):{unsubscribe:d.noop}},e.prototype._getScrollTop=function(){return this._scrollEl.getValue().fold(function(){return 0},function(e){return e.getBoundingClientRect().top})},e.prototype._getMarkRect=function(e){var t=e.viewportRect,n=t[0],r=t[1],i=n!==r?[Math.min(n.top,r.top),Math.max(n.top+n.height,r.top+r.height)]:[n.top,n.top+n.height],o=i[0],a=i[1];return{top:Math.round(o),bottom:Math.round(a)}},e.prototype._getCursorRect=function(){var e=this.quill.getSelection();if(e&&0===e.length){var t=this.quill.container.getBoundingClientRect(),n=this.quill.getBounds(e.index,1);return{bottom:n.bottom+t.top,height:n.height,left:n.left+t.left,right:n.right+t.left,top:n.top+t.top,width:n.width}}return null},e.prototype._ensurePlaceholder=function(){this._withPlaceholderClass&&(this._textLength>1?this.quill.container.classList.remove(this._withPlaceholderClass):this.quill.container.classList.add(this._withPlaceholderClass))},e.prototype._ensureSelection=function(e){var t=this,n=this.quill.getSelection();e(),n&&n.length>0&&this._clearSelection(function(){t.quill.setSelection(n.index,n.length,a.sources.API)})},e.prototype._clearSelection=function(e){var t=window.getSelection?window.getSelection():document.selection;t&&(t.removeAllRanges?t.removeAllRanges():t.empty&&t.empty()),e&&requestAnimationFrame(e)},Object.defineProperty(e.prototype,"viewport",{get:function(){var e=this;return this._scrollElRect.getValue().map(function(t){var n=e.quill.root.getBoundingClientRect(),r=n.top,i=n.bottom,o=n.left,a=n.right,s=n.width,l=e._viewportPadding.getValue().getOrElse(b.ViewportPadding.empty).top,c=t.top+l,u=r<c?c:r,d=i>t.bottom?t.bottom:i;return{left:o,right:a,width:s,top:u,bottom:d,height:d-u}})},enumerable:!0,configurable:!0}),e}();t.DEd=M,function(e){var t=function(e){function t(t){void 0===t&&(t={});var n=this;return f.setupQuillEnv(),n=e.call(this,t)||this,n.markChangeApplied=n._marker.markChangeApplied,Object.assign(n.quill,{setSelection:function(e,t){d.invariant(e>=0,"range selection can not accept negative values")}}),n}return o.__extends(t,e),Object.defineProperty(t.prototype,"mutationObserverPeriod",{get:function(){return MutationObserver._period},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"container",{get:function(){return this.quill.root},enumerable:!0,configurable:!0}),t.prototype.getCursor=function(){return l.Some({index:0,length:0})},t}(e);e.Mock=t}(M=t.DEd||(t.DEd={})),t.DEd=M},1525:function(e,t,n){"use strict";function r(e,t){return e.filter(function(e){var t=e.range(e.id);return t.start!==t.end&&"number"==typeof t.start&&"number"==typeof t.end&&!(-1===t.start&&-1===t.end)}).reduce(function(e,n){var r=n.range(n.id),i=r.start<0?0:r.start;return e.compose((new k.Delta).retain(i).retain(r.end-i,t(n)))},new k.Delta)}function i(e){for(var n=e;n;){if(n instanceof x.Marker&&t.getMarkId(n.domNode))return n;n=n.parent}return null}function o(e){for(var t=e,n=[];t;)t instanceof x.Marker&&n.push(t),t=t.parent;return n}function a(e){var t=e.children;return t&&t.head||null}function s(e){var t=e.children;return t&&t.tail||null}function l(e,t,n){for(var r=e,i=[];r;){r instanceof x.Marker&&n(r)&&i.push(r);var o="leftLeaf"===t?a(r):s(r);if(!o)break;r=o}return i}function c(e,t){var n=o(e).reverse();return n.reduce(function(e,n){if(n.next){var r=l(n.next,"prefix"===t?"rightLeaf":"leftLeaf",function(t){return e.some(function(e){return e.markId===t.markId})}),i=r.map(function(e){return e.markId});return e.filter(function(e){return-1===i.indexOf(e.markId)})}return e},n)}function u(e){return o(e).map(function(e){return e.markId})}function d(e,t){var n=t.index,r=t.length,i=e.slice(0,n).search(/[\w-]+$/),o=e.slice(n).search(/[^-_a-z0-9]/i),a=o+n;if(0===r&&(-1===i||0===o))return y.None;if(-1===o){var s=e.slice(i);return y.Some(new E.WordRange(i,i+s.length,s))}return e.slice(a,n+r).match(/[-_a-z0-9]/i)?y.None:y.Some(-1===i?new E.WordRange(n,a,e.slice(n,a)):new E.WordRange(i,a,e.slice(i,a)))}function p(e){if(e.insert)return e.insert.length;if(e.retain)return e.retain;if(e.delete)return-e.delete;throw new S.InvariantError("Unknown operation: "+e)}function f(e){var t=e.attributes;return!!t&&Object.keys(t).some(function(e){return-1!==e.indexOf(x.MarkerBlotName)&&-1===e.indexOf(C)})}function h(e,t){return void 0===t&&(t="suffix"),!(!e.insert||"string"!=typeof e.insert)&&("suffix"===t?S.StringUtils.isBreakWordChar(e.insert.charCodeAt(0)):S.StringUtils.isBreakWordChar(e.insert.charCodeAt(e.insert.length-1)))}function m(e){return w.Observable.fromEvent(e,"editor-change",function(e,t,n,r){return"text-change"===e?{name:"text-change",delta:t,oldDelta:n,source:r}:{name:"selection-change",range:t,oldRange:n,source:r}})}function g(e){return"selection-change"===e.name}function v(e){return"text-change"===e.name&&e.delta.ops.some(function(e){return!e.retain})}function _(){if(window.MutationObserver||n(1615),!document.getSelection){document.getSelection=function(){return null}}}function b(e){for(var t=e.text.get(),n=new k.Delta,r=0,i=0;i<t.length-1;i++)if("\r"===t[i]){var o=i-r;r=i,"\n"!==t[i+1]?(n.retain(o).delete(1).insert("\n"),r++):(n.retain(o).delete(1),r++)}var a=t.length-1,s=a-r;return"\r"===t[a]?n.retain(s).delete(1).insert("\n"):"\n"!==t[a]&&n.retain(s+1).insert("\n"),k.Change.delta(n,t.length)}Object.defineProperty(t,"__esModule",{value:!0});var y=n(14),w=n(23),E=n(1477),k=n(157),x=n(1498),S=n(3);t.marksToDelta=r,t.getMarkId=function(e){return e.getAttribute("data-mark-id")},t.findMarkerUp=i,t.lookupMarkersUp=o,t.lookupMarkersDown=l,t.findCornerBlotsUp=c,t.getMarksIdsByBlot=u,t.getWordAt=d,t.changeDiff=p;var C="64656E616E69";t.isMarkChangeOperation=f,t.isBreakWordInsert=h,t.toQuillObservable=m,t.filterSelectionChange=g,t.filterTextChange=v,t.setupQuillEnv=_,t.normalizeCRLF=b},1528:function(e,t){e.exports={root:"_aa79d879-denali-editor-page-root",body:"_3b0625a4-denali-editor-page-body",editorContainer:"_b95dd5a7-denali-editor-page-editorContainer _1cd6b501-typography-paper",withPlaceholder:"_9b8b3370-denali-editor-page-withPlaceholder",placeholder:"_795342d3-denali-editor-page-placeholder",spinner:"_6a83d09b-denali-editor-page-spinner",wrapper:"_16010cba-denali-editor-page-wrapper",preload:"_f7a4a0c3-denali-editor-page-preload"}},1529:function(e,t){e.exports={header:"_20bf506a-sidebar-header",lensWrapper:"_68477d1f-sidebar-lensWrapper",contentWrapper:"_4fce944e-sidebar-contentWrapper",lensviewContentWrapper:"_c10530d1-sidebar-lensviewContentWrapper _4fce944e-sidebar-contentWrapper",scrollWrapper:"_c4a1551c-sidebar-scrollWrapper",scroll:"_fa711b63-sidebar-scroll",counter:"_820bbd78-sidebar-counter",lensCounter:"_86327b7f-sidebar-lensCounter",headerBtn:"_d335f4a4-sidebar-headerBtn",importantLabel:"_78b7875f-sidebar-importantLabel",info:"_9774c814-sidebar-info",label:"_c6063ae9-sidebar-label",accuracy:"_02f67184-sidebar-accuracy _c6063ae9-sidebar-label",advanced:"_d8bfbf62-sidebar-advanced _c6063ae9-sidebar-label",labelGray:"_2f329197-sidebar-labelGray _c6063ae9-sidebar-label",rechecking:"_6b058340-sidebar-rechecking",headerWrapper:"_4c838c0b-sidebar-headerWrapper",viewport:"_9a3392c7-sidebar-viewport"}},1530:function(e,t){e.exports={wrapper:"_464ea80b-new_toggler-wrapper",counters:"_5782081d-new_toggler-counters",fadeOutCounters:"_75e9045e-new_toggler-fadeOutCounters _5782081d-new_toggler-counters",onboardingSpot:"_2ff210b8-new_toggler-onboardingSpot"}},1531:function(e,t){},1532:function(e,t){},1535:function(e,t,n){n(1532),e.exports=n(1553)},1540:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(122),a=n(574),s=n(1535),l=function(e){return"safari"===e?a.Documents.ACCEPTED_UPLOAD_MIME_TYPES.join(","):a.Documents.ACCEPTED_UPLOAD_EXTENSIONS.join(",")},c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._renderInput=function(e,n){return i.createElement("input",{ref:function(e){return t._inputElement=e},"data-name":"upload-element",type:"file",accept:l(t.props.browser),title:t.context.textResources.base.tooltipUploadElementInput,multiple:!1,className:e?s.upload:s.uploadContainer,onChange:function(e){var r="dataTransfer"in e?e.dataTransfer.files:e.target.files,i=t.props.documentUpload.upload(r,n);void 0!==t.props.onUpload&&t.props.onUpload(i)}})},t}return r.__extends(t,e),t.prototype.componentWillUnmount=function(){this.props.documentUpload.navigated()},t.prototype.render=function(){var e=this,t=this.props,n=t.hideTooltip,r=t.showNotification;return n?i.createElement("div",{className:s.uploadContainer,onClick:function(){return e._inputElement&&e._inputElement.click()}},this._renderInput(!0,r)):this._renderInput(!1,r)},t}(o.BaseComponent);t.UploadElement=c},1541:function(e,t,n){"use strict";function r(e,t){return void 0===t&&(t=""),a[e+t]}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(7),a=n(1517),s=n(13),l=n(573),c=n(1467),u=n(1461),d=n(1520);t.OnboardingNotificationBase=function(e){var t=e.alignment,n=e.onClose,c=e.themes,d=e.triangleCustomStyle,p=e.customStyle,f=e.children,h=e.hideCloseButton;return s.createElement(o.F.div,i.__assign({},o.classes(r(t),a.stepWrapper,c&&c.className),{style:p}),s.createElement(o.F.span,i.__assign({},o.classes(r(t,"Triangle"),a.triangle,c&&c.triangleClassName),{style:d})),s.createElement(l.Icon.Grammarly,{className:a.alertIcon}),f,!h&&s.createElement(u.Button,{name:"onboard-close",className:a.closeIconWrapper,onClick:function(){return n&&n()}},s.createElement(l.Icon.Close,{className:a.closeIcon,width:12})))},t.OnboardingNotification=function(e){var n=e.title,r=e.description,o=i.__rest(e,["title","description"]);return s.createElement(t.OnboardingNotificationBase,i.__assign({},o),s.createElement("span",{className:a.content},s.createElement(c.P1,{className:a.header},n),s.createElement(c.P2,{className:a.description},r)))},t.DiscoverabilityOnExit=function(e){var n=e.onExitClick,r=e.onReviewClick,i=e.unreviewedAlertsCount,l=e.themes,p=void 0===l?{className:a.discoverabilityOnExit,triangleClassName:a.discoverabilityOnExitTriangle}:l,f=o.Atom.create(!1);return s.createElement(t.OnboardingNotificationBase,{hideCloseButton:!0,alignment:"bottomFlexible",themes:p},s.createElement("span",{className:a.dicsoverabiltyContent},s.createElement(c.P2,{className:a.description},"This document has ",i," unviewed"," ",i.view(function(e){return e>1?"alerts":"alert"}),"."),s.createElement("div",{className:a.buttonsList},s.createElement(u.Button,{name:"onboard-exit",className:a.button,onClick:function(){return n(!f.get())}},"Exit anyway"),s.createElement(u.Button,{name:"onboard-review",className:a.button,onClick:function(){return r(!f.get())}},"Review now")),s.createElement(d.Checkbox,{checked:f,className:a.checkbox,name:"on-exit"},s.createElement(c.P2,{className:a.checkboxText},"Don’t warn me again"))))}},1542:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(122),s=n(593),l=n(1461),c=n(573),u=n(1724),d=n(36),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.render=function(){var e=this,t=s.getUpgradeUrl(this.context.appConfig.funnel.upgrade,this.props.place,this.props.upgradeViewModel.getAllAlertsLike(),this.props.upgradeViewModel.docId);return i.createElement(l.Button,r.__assign({name:"upgrade"},o.classes("big"===this.props.size?u.baseBig:"link"===this.props.size?u.link:u.baseSmall,this.props.className),{onClick:function(){return e.props.upgradeViewModel.openUpgradeUrl(t,e.context.appConfig,d.isDesktopEditor(d.getBrowserInfo().browser))}}),"link"===this.props.size?i.createElement(c.Icon.PaidGraident,null):i.createElement(c.Icon.Paid,{className:"big"===this.props.size?u.bigIcon:u.smallIcon})," ","Go Premium")},t}(a.BaseComponent);t.UpgradeButton=p},1543:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(573),a=n(1528),s=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(n,e),n.prototype.render=function(){return i.createElement(t.PreloadWrapper,null,i.createElement(o.DefaultSVGLinearGradient,null))},n}(i.Component);t.PreloadComponent=s,t.PreloadWrapper=function(e){var t=e.children;return i.createElement("div",{className:a.preload},t)}},1544:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(23),i=n(14),o=n(7),a=n(1463),s=n(3),l=300,c=function(){function e(e,t,n,c){var u=this;this._marksVM=e,this._closeEvent=t,this._alertsList=n,this._synonymsViewModel=c,this._hoveredAlertState=o.Atom.create({type:"initial"}),this._subs=[],this._delayedAlert=function(e){return r.Observable.of(e).delay(l)},this._toMarkAndAlert=function(e){return e.filter(function(e){return void 0!==u._alertsList.getAllAlerts()[e.alert.id]}).flatMap(function(e){return s.invariant(!a.Alert.isPlagiarism(e.alert),"Can't hover plagiarism alert"),e.mark.map(function(t){return{mark:t,alert:e.alert}})})},this.alertHovered=this._hoveredAlertState.switchMap(function(e){switch(e.type){case"initial":return u._marksVM.alertHovered.switchMap(function(e){return e.fold(function(){return r.Observable.of(i.None)},function(e){return u._delayedAlert(i.Some(e))})});case"hovered":return r.Observable.never();case"unhovered":return u._marksVM.alertHovered.switchMap(function(t){return t.fold(function(){return u._delayedAlert(i.Option.empty())},function(t){return t.alert.id===e.ma.alert.id?r.Observable.empty():s.Animation.rafSequence([i.None,i.Some(t)],!0)})}).first().do(function(e){e.isEmpty()&&requestAnimationFrame(function(){u._hoveredAlertState.set({type:"initial"})})});case"disabled":return r.Observable.of(i.None);default:return s.assertNever(e)}}).distinctUntilChanged(function(e,t){return s.isOptionsEq(e,t,function(e,t){return e.alert.id===t.alert.id})}).map(this._toMarkAndAlert).do(function(e){return e.forEach(function(){return u._synonymsViewModel.close()})}).share(),this._subs.push(r.Observable.combineLatest(this._marksVM.alertHovered,this._hoveredAlertState).subscribe(function(e){var t=e[0],n=e[1];t.fold(function(){switch(n.type){case"hovered":case"unhovered":break;case"initial":case"disabled":u._marksVM.highlightedAlert.set(i.None);break;default:s.assertNever(n)}},function(e){return u._marksVM.highlightedAlert.set("disabled"===n.type?i.None:i.Some(e.alert))})}),this._closeEvent.subscribe(function(){u._hoveredAlertState.modify(function(e){return"disabled"!==e.type?{type:"initial"}:e})}),this._synonymsViewModel.popupShown.skip(1).subscribe(function(e){return e?u._hoveredAlertState.set({type:"disabled"}):u._hoveredAlertState.set({type:"initial"})}))}return e.prototype.dispose=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},e.prototype.setAlertHoveredState=function(e){this._hoveredAlertState.set(e)},e}();t.InlineCardViewModelImpl=c;!function(e){e.DATA_NAME="inline-card",e.isInlineCard=function(t){return!!t&&t.getAttribute("data-name")===e.DATA_NAME}}(t.InlineCardVM||(t.InlineCardVM={}))},1545:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(23),a=n(7),s=n(3),l=n(1463),c=n(573),u=n(1461),d=n(1483),p=n(1566),f=n(1506),h=n(1579),m=n(1485),g=n(575),v=n(122),_=n(1496),b=["b","i","br"],y=function(e){return s.ReactUtils.setInnerHTML(e,{allowedTags:b})},w=function(e){return function(){return e(),new Promise(s.noop)}};t.Full=v.withContext(function(e,t){var n=e.card,s=e.cardsViewModel,d=e.marksViewModel,v=e.alignmentViewModel,b=s.getState(n).view(function(e){var t=e.transition,n=e.from;return"expanded"===t.type||n.exists(function(e){return"expanded"===e&&"rendered"===t.type})}),S=b.view(function(e){return e?t.textResources.denali.card.less:t.textResources.denali.card.more}),C=n.activeAlert;return i.createElement(a.F.div,{className:h.wrapper},i.createElement(a.F.div,{className:h.main},C.replacementsLabels.map(function(e){return i.createElement(m.Onboarding,{key:"onboarding",alignment:"bottomFlexible",eventType:"onclick",stepId:"step4",title:"Accept a correction",message:"Click on a suggestion to apply it to your text.",findFirstButton:{dotPosition:"rightTop"},themes:{notificationClassName:h.onboardingNotification}},i.createElement(f.ReplacementsLabelsComponent,{key:"replacementsLabels",replacementsLabels:e,onClick:function(e){return w(function(){return C.apply(e,l.AlertActionSource.sidebar)})}}))}).getOrElseL(function(){return i.createElement(E,{text:C.title})}),i.createElement("div",r.__assign({className:h.description},y(C.explanation))),i.createElement(k,{alert:n.activeAlert})),i.createElement(u.Button,{key:"align-button",name:"align",onClick:function(){return v.alignMarkToCard(n,_.AlignmentAnimation.ANIMATE_ALL)},className:d.isActiveMarkInvisible(C.id).debounce(function(e){return e?o.Observable.timer(350):o.Observable.empty()}).map(function(e){return e?h.alignButtonVisible:h.alignButtonHidden}).startWith(h.alignButtonHidden)},"Show in text"),!C.extraProperties.hasAddToDictionary&&(C.examples.nonEmpty()||C.details.nonEmpty())&&[i.createElement(u.Button.Round,{name:S,title:S,className:h.expandBtn,onClick:w(function(){s.startTransitionTo(n,{type:b.get()?"focused":"expanded",clockwise:!0}),b.get()&&C.sendFeedback(g.FeedbackType.EXPANDED,l.AlertActionSource.sidebar)}),key:"toggle-more"},b.view(function(e){return e?i.createElement(c.Icon.More,{className:h.lessIcon}):i.createElement(c.Icon.Expand,null)})),i.createElement(a.F.div,{className:b.view(function(e){return e?h.more:h.moreHidden}),key:"block-more"},C.details.map(function(e){return i.createElement("div",r.__assign({key:"details",className:h.description},y(e)))}).orNull(),C.examples.map(function(e){return i.createElement(p.Examples,{key:"examples",examples:e})}).orNull())],C.replacementsLabels.isEmpty()&&i.createElement(x,{alert:C}))});var E=function(e){var t=e.text;return i.createElement("div",r.__assign({className:h.title},y(t)))},k=v.withContext(function(e,t){var n=e.alert;return i.createElement(a.F.div,{className:h.buttons},i.createElement(u.Button.Round,{name:"ignore",title:t.textResources.denali.card.dismiss,onClick:w(function(){return n.sendFeedback(g.FeedbackType.IGNORE,l.AlertActionSource.sidebar)})},i.createElement(c.Icon.Ignore,null)),n.replacementsLabels.nonEmpty()&&i.createElement(d.Dropdown,{label:i.createElement(u.Button.Round,{name:"report"},i.createElement(c.Icon.Report,null)),align:"right",key:"report",theme:h,name:"report"},i.createElement(u.Button.Flat,{name:"report-incorrect",onClick:w(function(){return n.sendFeedback(g.FeedbackType.WRONG_SUGGESTION,l.AlertActionSource.sidebar)})},t.textResources.denali.card.wrong),i.createElement(u.Button.Flat,{name:"report-offensive",onClick:w(function(){return n.sendFeedback(g.FeedbackType.OFFENSIVE_CONTENT,l.AlertActionSource.sidebar)})},t.textResources.denali.card.offensive)),n.extraProperties.hasAddToDictionary&&i.createElement(u.Button.Round,{name:"add-to-dict",title:t.textResources.denali.card.addToDict,className:h.dictBtn,onClick:w(function(){return n.sendFeedback(g.FeedbackType.ADD_TO_DICTIONARY,l.AlertActionSource.sidebar)})},i.createElement(c.Icon.Dict,null)))}),x=v.withContext(function(e,t){var n=e.alert;return i.createElement("div",{className:h.feedback},i.createElement(u.Button.Caps,{name:"like",className:h.feedbackButton,key:"feedback-yes",onClick:function(){n.sendFeedback(g.FeedbackType.LIKE,l.AlertActionSource.sidebar)}},t.textResources.denali.card.like,i.createElement(c.Icon.Yes,{className:h.feedbackIcon})),i.createElement(u.Button.Caps,{name:"unlike",className:h.feedbackButton,key:"feedback-no",onClick:function(){n.sendFeedback(g.FeedbackType.DISLIKE,l.AlertActionSource.sidebar)}},t.textResources.denali.card.dislike,i.createElement(c.Icon.Close,{className:h.feedbackIcon})))})},1546:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(1467),s=n(1731);t.SidebarHeader=function(e){var t=e.title,n=e.theme,l=void 0===n?{}:n,c=e.children;return i.createElement(o.F.div,{className:l.wrapper},i.createElement(o.F.header,r.__assign({},o.classes(s.header,l.header)),i.createElement(a.H1,{className:l.title},t),c))}},1547:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(122);t.subscriptionRoutes={summary:r.Router.page({path:"/subscription",exact:!0}),manage:r.Router.page({path:"/subscription/manage"}),billing:r.Router.page({path:"/subscription/billing"}),notFound:r.Router.page({path:"*"})}},1551:function(e,t,n){t=e.exports=n(1474)(),t.push([e.i,"._14edec33-sections-section{border-top:1px solid #e4e6f2;page-break-inside:avoid}._423c293e-sections-sectionHeader{margin-top:40.8px;color:#2b2d38;letter-spacing:0;font-weight:700;font-size:30.6px;line-height:54.4px}._857168c9-sections-genericTable{width:100%;table-layout:fixed;text-align:left}._264a0c93-sections-text{color:#8189a9;letter-spacing:.187px;font-size:22.1px;line-height:34px}",""]),t.locals={section:"_14edec33-sections-section",sectionHeader:"_423c293e-sections-sectionHeader",genericTable:"_857168c9-sections-genericTable",text:"_264a0c93-sections-text"}},1552:function(e,t){e.exports={clearfix:"_c52c18-clearfix",notification:"_c52c18-notification",show:"_c52c18-show",hide:"_c52c18-hide",content:"_c52c18-content",link:"_c52c18-link",close:"_c52c18-close",header:"_c52c18-header",notificationComponent:"_c52c18-notificationComponent"}},1553:function(e,t){e.exports={uploadContainer:"_da9eb0-uploadContainer",upload:"_da9eb0-upload"}},1556:function(e,t){e.exports={notificationWrapper:"_c456df82-notification-notificationWrapper",topNotification:"_b3e5371c-notification-topNotification",overContent:"_0e756bc4-notification-overContent",bottomNotification:"_a38bac11-notification-bottomNotification",notification:"_c4fc0bd9-notification-notification",fixedNotification:"_fd33176c-notification-fixedNotification",flexibleNotification:"_2ab8ba06-notification-flexibleNotification",contentWrapper:"_15edd01d-notification-contentWrapper",miniContentWrapper:"_8b826d2f-notification-miniContentWrapper",content:"_b9ba39c4-notification-content",miniContent:"_86fec6cb-notification-miniContent",link:"_6eb0ba2d-notification-link",header:"_4bfe2f39-notification-header _e635cd19-typography-p1",alertIcon:"_cabfea3f-notification-alertIcon",alertIconMini:"_ccbac4db-notification-alertIconMini",alertUndoBtn:"_ce1f259c-notification-alertUndoBtn",alertUndoIcon:"_47ea2b65-notification-alertUndoIcon",alertUndoContent:"_20a974cf-notification-alertUndoContent",alertUndoWrapper:"_bfe4d5a0-notification-alertUndoWrapper",closeIconWrapper:"_0038d2a2-notification-closeIconWrapper",closeIconWrapperMini:"_645a53fa-notification-closeIconWrapperMini",closeIcon:"_b2dcace0-notification-closeIcon",replaceDeleted:"_dcd41bb3-notification-replaceDeleted",replaceMargin:"_66775c65-notification-replaceMargin",description:"_4e648da0-notification-description",overlayContentBase:"_f5047578-notification-overlayContentBase",overlayContent:"_fc35ae3d-notification-overlayContent _f5047578-notification-overlayContentBase",overlayContentFaded:"_b7e1efe3-notification-overlayContentFaded _f5047578-notification-overlayContentBase"}},1557:function(e,t){e.exports={header1:"_f0b953d7-typography-header1",header2:"_d8f62229-typography-header2",header3:"_44f85ed9-typography-header3",paper:"_1cd6b501-typography-paper",p1:"_e635cd19-typography-p1",p2:"_8d8a7136-typography-p2",small:"_fb866abb-typography-small"}},1558:function(e,t,n){var r=n(1842);"string"==typeof r&&(r=[[e.i,r,""]]);n(1478)(r,{});r.locals&&(e.exports=r.locals)},1559:function(e,t,n){"use strict";function r(){return void 0===p&&(p=d.Monitoring.Logging.getLogger("Button")),p}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(13),a=n(7),s=n(1468),l=n(75),c=n(3),u=n(1516),d=n(6),p=void 0,f=function(e){function t(t,n){var r=e.call(this,t)||this;return r._hovered=a.Atom.create(!1),r._setInternals(t),r._isHovered=void 0!==n.hovered?a.Atom.combine(n.hovered,r._hovered,c.or):r._hovered,r}return i.__extends(t,e),t.prototype.getChildContext=function(){return{hovered:this._isHovered,disabled:"boolean"==typeof this._isDisabled?a.Atom.create(this._isDisabled):this._isDisabled,active:"boolean"==typeof this._isActive?a.Atom.create(this._isActive):this._isActive}},t.prototype.componentWillReceiveProps=function(e){this._setInternals(e)},t.prototype.render=function(){var e=void 0!==this.props.href?this._genLinkEl():this._genDivEl();return this.props.title?o.createElement(s.Tooltip,{title:this.props.title,align:this.props.titleAlign||"auto"},e):e},Object.defineProperty(t.prototype,"_name",{get:function(){var e=this.props.name,t="string"==typeof e?e:e.get();return void 0!==this.context.name?this.context.name+"-"+t:t},enumerable:!0,configurable:!0}),t.prototype._setInternals=function(e){var t=this,n=e.onClick?this._getGenericButtonInternals(e.onClick,e.disabled):{onClick:void 0,isDisabled:void 0!==e.disabled&&e.disabled},i=n.onClick,o=n.isDisabled;this._onClick=function(e){return r().info("Button clicked: "+t._name),i&&i(e)},this._isDisabled=o,this._isActive=void 0!==e.active&&e.active},t.prototype._genLinkEl=function(){var e=this;return o.createElement(a.F.a,i.__assign({href:this.props.href,target:this.props.target,onClick:this._onClick,onMouseEnter:function(){return e._hovered.set(!0)},onMouseLeave:function(){return e._hovered.set(!1)},"data-name":this._name,"data-disabled":this._isDisabled,"data-hovered":this._isHovered},a.classes(u.linkBtn,this.props.className),{style:this.props.style}),this.props.children)},t.prototype._genDivEl=function(){var e=this;return o.createElement(a.F.div,{role:"button",onClick:this._onClick,onMouseEnter:function(){return e._hovered.set(!0)},onMouseLeave:function(){return e._hovered.set(!1)},"data-name":this._name,"data-disabled":this._isDisabled,"data-active":this._isActive,"data-hovered":this._isHovered,className:this.props.className,style:this.props.style},this.props.children)},t.prototype._getGenericButtonInternals=function(e,t){void 0===t&&(t=!1);var n=a.Atom.create(!1),r="boolean"==typeof t?n.view(function(e){return t||e}):a.Atom.combine(t,n,c.or);return{onClick:this._decorateOnClickWithStateManager(e,function(e){return n.set(e)},function(){return r.get()}),isDisabled:r}},t.prototype._decorateOnClickWithStateManager=function(e,t,n){var r=this;return function(o){return i.__awaiter(r,void 0,void 0,function(){return i.__generator(this,function(r){switch(r.label){case 0:if(o.stopPropagation(),n())return[2];t(!0),r.label=1;case 1:return r.trys.push([1,,3,4]),this._hovered.set(!1),[4,e()];case 2:return[2,r.sent()];case 3:return t(!1),[7];case 4:return[2]}})})}},t.displayName="BaseButton",t.contextTypes=i.__assign({},l.ElementState.HoveredContextTypes,l.ElementState.GroupedContextTypes),t.childContextTypes=l.ElementState.contextTypes,t}(o.Component);t.BaseButton=f},1560:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(23),a=n(14),s=n(7),l=n(1463),c=n(573),u=n(1461),d=n(1506),p=n(1544),f=n(3),h=n(1574),m=n(575),g=function(e){var t=e.title,n=e.className;return i.createElement("div",r.__assign({className:n},f.ReactUtils.setInnerHTML(t.toLowerCase(),{allowedTags:["i","b"]})))},v=function(e){var t=e.title,n=e.explanation;return i.createElement("div",null,i.createElement(g,{className:h.bigTitle,title:t}),i.createElement("div",r.__assign({className:h.explanation},f.ReactUtils.setInnerHTML(n,{allowedTags:["i","b"]}))))};t.CardCommon=function(e){var t=e.alert,n=e.onApply,r=e.onAddToDictionary,o=e.onIgnore,a=e.openAlert,s=function(e){return/Unknown/.test(e.patternName)},l=function(e,t){return/Unknown/.test(e.patternName)?"Unknown word":/Misspelled\/General/.test(e.patternName)?"":e.extraProperties.didYouMean||e.extraProperties.showTitle?"Check word usage":t};return i.createElement("div",{className:h.card},t.replacementsLabels.isEmpty()?!s(t)&&i.createElement(v,{title:t.title,explanation:t.explanation}):t.replacementsLabels.map(function(e){return i.createElement(d.InlineReplacementsLabelsComponent,{key:"replacementsLabels",replacementsLabels:e,onClick:n,header:l(t,e.tooltipText.replace("Click to","")),customStyle:h})}).orNull(),t.extraProperties.hasAddToDictionary&&i.createElement(u.Button.Flat,{name:"add-to-dictionary",className:s(t)?h.footerButtonBig:h.footerButtonShort,onClick:r},s(t)&&i.createElement(g,{className:h.unknownWordTitle,title:t.title}),i.createElement(c.Icon.Dict,{className:h.addToDictIcon})," Add to dictionary"),i.createElement(u.Button.Flat,{name:"dismiss",className:h.footerButtonShort,onClick:function(){return o()}},i.createElement(c.Icon.Ignore,{className:h.dismissIcon})," Dismiss"),i.createElement(u.Button.Flat,{name:"see_more",className:h.footerButtonShort,onClick:a},i.createElement(c.Icon.Expand,null)," See more"))};var _=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isMaxWidth:!1},t}return r.__extends(n,e),n.prototype.componentDidMount=function(){this.el&&this.el.firstElementChild&&this.el.firstElementChild.clientWidth>=288&&this.setState({isMaxWidth:!0})},n.prototype.render=function(){var e=this,n=this.props,o=n.alert,a=n.onApply,l=n.onIgnore,c=n.onAddToDictionary,u=n.openAlert;return i.createElement("div",r.__assign({onClick:function(e){return e.stopPropagation()},key:o.id,ref:function(t){return e.el=t}},s.classes(this.state.isMaxWidth&&h.maxWidthReached)),i.createElement(t.CardCommon,{alert:o,onApply:a,onIgnore:l,onAddToDictionary:c,openAlert:u}))},n}(i.Component);t.Card=_;var b=8,y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._subs=[],t._state=s.Atom.create({visibility:"visible",position:{top:0,left:0},direction:"down"}),t._updatePosition=function(e){var n=t.props.getPosition(),i=n.abs,o=n.relative,a=t._el.offsetHeight,s=i.height+i.top+a,l=s>e.height+e.top&&o.height<e.height?"up":"down";t._state.modify(function(e){return r.__assign({},e,{direction:l,position:{top:"up"===l?o.top-a-b:o.top+o.height,left:o.left}})})},t._getClass=function(e,n){return f.DOM.classes(t._getMainClass(e),"up"===n&&h.directionUp)},t._withOnClose=function(e){return function(){e(),t.props.onClose()}},t}return r.__extends(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.viewport;(0,e.onMount)(),this._subs.push(o.Observable.combineLatest(t,this._state.filter(function(e){return"visible"===e.visibility}),function(e){return e}).subscribe(this._updatePosition))},t.prototype.componentWillReceiveProps=function(e){var t=this;if(this.props.mode!==e.mode)switch(e.mode){case"removed":this._state.modify(function(e){return r.__assign({},e,{visibility:"invisible"})});break;case"added":requestAnimationFrame(function(){return t._state.modify(function(e){return r.__assign({},e,{visibility:"visible"})})}),e.onMount();break;default:f.assertNever(e.mode)}},t.prototype.componentWillUnmount=function(){this._resetSubs()},t.prototype.shouldComponentUpdate=function(){return!1},t.prototype._resetSubs=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},t.prototype._getMainClass=function(e){switch(e){case"invisible":return h.invisible;case"visible":return h.visible;default:return f.assertNever(e)}},t.prototype.render=function(){var e=this,t=this.props,n=t.alert,o=t.onMouseLeave,a=t.onMouseEnter,c=t.openAlert;return i.createElement(s.F.div,r.__assign({key:n.id,tabIndex:-1,"data-name":p.InlineCardVM.DATA_NAME,mount:function(t){return e._el=t},style:this._state.view("position")},s.classes(h.container,this._state.view(function(t){var n=t.visibility,r=t.direction;return e._getClass(n,r)})),{onMouseEnter:a,onMouseLeave:o}),i.createElement(_,{alert:n,onAddToDictionary:this._withOnClose(function(){n.sendFeedback(m.FeedbackType.ADD_TO_DICTIONARY,l.AlertActionSource.text)}),onApply:function(t){return e._withOnClose(function(){return n.apply(t,l.AlertActionSource.text)})},onIgnore:this._withOnClose(function(){return n.sendFeedback(m.FeedbackType.IGNORE,l.AlertActionSource.text)}),openAlert:this._withOnClose(function(){return c()})}))},t}(i.Component);t.InlineCard=y;var w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.componentWillUnmount=function(){this.props.inlineCardVM.dispose()},t.prototype._toMarkAlert=function(e){var t=e.alert,n=e.mark;return{alert:t,mark:a.Some(n)}},t.prototype.render=function(){var e=this,t=this.props,n=t.className,r=t.inlineCardVM,o=t.openAlert,l=t.viewport,c=t.onboardingViewModel;return i.createElement(s.F.div,{className:n},r.alertHovered.startWith(a.None).pairwise().map(function(t){var n=t[0],a=t[1];return[n.map(function(e){var t=e.alert;return i.createElement(y,{key:t.id,alert:t,viewport:l,onMouseEnter:f.noop,onMouseLeave:f.noop,onClose:f.noop,onMount:f.noop,getPosition:function(){return{abs:f.DOM.Rect.empty,relative:f.DOM.Rect.empty}},openAlert:f.noop,mode:"removed"})}).orNull(),a.map(function(t){return i.createElement(y,{key:t.alert.id,alert:t.alert,getPosition:function(){return{abs:t.mark.viewportRect[0],relative:t.mark.firstClientRect}},viewport:l,onMouseEnter:function(){r.setAlertHoveredState({type:"hovered",ma:e._toMarkAlert(t)})},onMouseLeave:function(){r.setAlertHoveredState({type:"unhovered",ma:e._toMarkAlert(t)})},onClose:function(){r.setAlertHoveredState({type:"disabled"})},onMount:function(){r.setAlertHoveredState({type:"unhovered",ma:e._toMarkAlert(t)}),c.step2Taken()},openAlert:function(){return o(t.alert)},mode:"added"})}).orNull()]}))},t}(i.Component);t.InlineCardView=w},1561:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(1721),a=2*Math.PI*32,s=function(e,t,n){return e<t?t:e>n?n:e},l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.render=function(){var e,n=this.props,l=n.percentage,c=n.aimValue,u=void 0===c?100:c,d=n.color,p=n.description,f=n.theme,h=void 0===f?o:f,m=[i.createElement("circle",{key:"circle",id:"circle",cx:36,cy:36,r:32,fill:"none"})],g=s(l,0,100),v=s(u,g,100);return"string"==typeof d?e=d:(this._gradientId=this._gradientId||"pb-gradient-"+t._nextGradientId++,m.push(i.createElement("linearGradient",r.__assign({id:this._gradientId,key:this._gradientId,gradientTransform:"rotate(90 36 36)",gradientUnits:"userSpaceOnUse"},d.coordinates),i.createElement("stop",{stopColor:d.start,offset:"0%"}),i.createElement("stop",{stopColor:d.end,offset:"100%"}))),e="url(#"+this._gradientId+")"),i.createElement("svg",{className:h.radialProgressBar,viewBox:"0 0 72 72"},i.createElement("defs",null,m),i.createElement("use",{className:h.circle,stroke:g>=94?"#fff":"#f1f2fa",strokeWidth:"5",strokeDasharray:a,strokeDashoffset:a*(100-v)/100,strokeLinecap:"round",xlinkHref:"#circle",transform:"rotate(-90 36 36)"}),i.createElement("g",{className:h.valueCircle,strokeDasharray:a,strokeDashoffset:a*(100-g)/100,strokeLinecap:"round",transform:"rotate(-90 36 36)"},i.createElement("use",{stroke:"#fff",strokeWidth:"10",xlinkHref:"#circle"}),i.createElement("use",{stroke:e,fill:e,strokeWidth:"5",xlinkHref:"#circle"})),i.createElement("text",{className:h.progress,y:"60%",x:"50%",textAnchor:"middle"},g),p&&i.createElement("text",{className:h.description,y:"80%",x:"50%",textAnchor:"middle"},p))},t._nextGradientId=0,t}(i.Component);t.RadialProgressBar=l},1562:function(e,t,n){"use strict";function r(e,t,n){e.modify(function(e){var r=e.slice(0);return r[t]=n,r})}function i(){return m.Observable.of(!0)}function o(e,t){return e.sidebarOpened.switchMap(p.choose(m.Observable.of(!1),t.lenses.map(function(e){return p.ObjectUtils.toArray(e).some(function(e){return e.type===h.Lens.Type.Critical})})))}function a(e,t){return e.sidebarOpened.switchMap(p.choose(m.Observable.of(!1),t.lenses.map(function(e){return p.ObjectUtils.toArray(e).some(function(e){return e.type!==h.Lens.Type.Critical})}).distinctUntilChanged()))}function s(e){return e.state.view(function(e){return _.LensState.isLensview(e)&&e.currentLens.cardAppearance===_.CardAppearance.always&&g.Alert.isAlert(e.currentLens.card.activeAlert)&&e.currentLens.card.activeAlert.replacementsLabels.nonEmpty()})}function l(e,t){return e.sidebarOpened.pairwise().filter(function(e){e[0];return!e[1]}).switchMap(function(){return t.alertEvents.mapTo(p.RxUtils.voidValue).startWith(p.RxUtils.voidValue)}).debounceTime(1e3).filter(function(){return 0===t.getAllAlertsAsArray().filter(function(e){return!g.Alert.isPremium(e)}).length}).first().map(function(){return!0})}function c(e){return e.lenses.view(function(e){return e.length>1})}function u(){return m.Observable.of(!0)}Object.defineProperty(t,"__esModule",{value:!0});var d=n(7),p=n(3),f=n(14),h=n(1464),m=n(23),g=n(1463),v=n(6),_=n(1465),b=function(){function e(e,t,n,i,o){var a=this;this._pageVM=t,this._alertsList=n,this._sidebarVM=i,this._features=o,this._log=v.Monitoring.Logging.getLogger("OnboardingViewModelImpl",v.Logging.LogLevel.TRACE),this._steps={},this._switches=d.Atom.create([]),this._states=d.Atom.create([]),this._subs=[],this._stepsSubscriptions=[],this._enableState=d.Atom.create(!0),this._addStep=function(e,t,n,i){r(a._switches,t,!1);var o=a._states.lens(d.Lens.index(t).compose(d.Lens.withDefault("dummy")));r(a._states,t,i.has(e)?"passed":"hidden"),a._steps[e]={state:o,idx:t},a._stepsSubscriptions.push(n().combineLatest(a._enableState,function(e,t){return e&&t}).subscribe(function(e){return r(a._switches,t,e)},function(e){a._log.error("onboarding malfunction",e),r(a._states,t,"passed")}))};var s=this._features.showOnboarding?new Set:new Set(e.onboardingPassed.get());this._initSteps(s),this._subs.push(this._switches.subscribe(function(e){return a._updateStates(e)})),this._subs.push(this._states.skip(1).subscribe(function(t){return e.updateOnboardingPassed(Object.keys(a._steps).filter(function(e){return"passed"===t[a._steps[e].idx]}))})),this._log.isEnabled(v.Logging.LogLevel.TRACE)&&this._subs.push(this._states.subscribe(function(e){return a._log.debug("Onboarding states updated: "+e.join(", "))})),p.registerDebugHelper("fireOnboardingStep",function(e,t){return f.Option.of(a._steps[e]).fold(function(){return console.info("No such step "+e)},function(e){return e.state.set(t)})}),p.registerDebugHelper("onboardingState",this)}return e.prototype._getAvailableSteps=function(e,t,n,r){if(p.invariant(!(e.denali.halfSidebar||e.denali.horizontalToolbar),"Onboarding logic (step 7) is currently incorrect for the cases when halfSidebar and horizontalToolbar features are turned on"),e.hideOnboarding&&!e.showOnboarding)return[];if(e.denali.halfSidebar){var d=[["step2",function(){return o(t,n)}],["step1",function(){return i()}],["step8",function(){return u()}],["step7",function(){return c(r)}],["step4",function(){return s(t)}]];return e.denali.horizontalToolbar&&d.push(["step6",function(){return l(t,n)}]),d}return e.denali.horizontalToolbar?[["step2",function(){return o(t,n)}],["step3",function(){return a(t,n)}],["step1",function(){return i()}],["step8",function(){return u()}],["step4",function(){return s(t)}],["step6",function(){return l(t,n)}]]:[["step2",function(){return o(t,n)}],["step3",function(){return a(t,n)}],["step7",function(){return c(r)}],["step1",function(){return i()}],["step8",function(){return u()}],["step4",function(){return s(t)}]]},e.prototype._initSteps=function(e){var t=this;void 0===e&&(e=new Set),this._stepsSubscriptions.forEach(function(e){return e.unsubscribe()}),this._stepsSubscriptions=[],this._getAvailableSteps(this._features,this._pageVM,this._alertsList,this._sidebarVM).forEach(function(n,r){return t._addStep(n[0],r,n[1],e)})},e.prototype.isStepEnabled=function(e){return void 0!==this._steps[e]},e.prototype.subscribeForStep=function(e){var t=this,n=this._steps[e].state;if(void 0===n)throw new Error("Illegal onboarding step id "+e);return{id:e,state:n,dotClicked:function(){p.invariant("dot"===n.get(),"Should be in dot state"),t._log.info("Dot clicked for: "+e),n.set("popup")},popupIgnored:function(){p.invariant("popup"===n.get(),"Should be in popup state"),t._log.info("Popup ignored for: "+e),n.set("hidden"),t._updateStates(t._switches.get())},popupClosed:function(){p.invariant("popup"===n.get(),"Should be in popup state"),t._log.info("Popup closed for: "+e),n.set("passed"),t._updateStates(t._switches.get())},actionTaken:function(){p.invariant("popup"===n.get()||"dot"===n.get(),"Should be in popup or dot state"),t._log.info("Action taken for: "+e),n.set("passed"),t._updateStates(t._switches.get())}}},e.prototype.unsubscribe=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._stepsSubscriptions.forEach(function(e){return e.unsubscribe()})},e.prototype.step2Taken=function(){if(this.isStepEnabled("step2")){var e=this.subscribeForStep("step2"),t=e.state.get();"dot"!==t&&"popup"!==t||e.actionTaken()}},e.prototype.changeState=function(e){this._enableState.set(e)},e.prototype.relaunchAllSteps=function(){this._initSteps()},e.prototype._updateStates=function(e){this._log.debug("Onboarding switches updated "+e);var t=this._states.get().slice();e.forEach(function(e,n){e||"hidden"===t[n]||"passed"===t[n]||(t[n]="hidden")});var n=t.filter(function(e){return"dot"===e}).length,r=t.filter(function(e){return"popup"===e}).length;p.invariant(r<=1,"Should be only one popup visible, now "+r);for(var i=r>0?2:1,o=Math.max(0,i-n),a=0;a<t.length&&o>0;++a)if("hidden"===t[a]){if(!e[a])break;o--,t[a]="dot"}this._states.set(t)},e}();t.OnboardingViewModelImpl=b;var y=function(){function e(){this._steps={}}return e.prototype.isStepEnabled=function(e){return void 0!==this._steps[e]},e.prototype.relaunchAllSteps=function(){v.Monitoring.Logging.getLogger("OnboardingViewModelImpl").error("Not implemented")},e.prototype.setState=function(e,t){this.subscribeForStep(e).state.set(t)},e.prototype.subscribeForStep=function(e){var t=d.Atom.create("hidden");return this._steps[e]||(this._steps[e]={id:e,state:t,dotClicked:function(){return t.set("popup")},popupClosed:function(){return t.set("passed")},popupIgnored:function(){return t.set("hidden")},actionTaken:function(){return t.set("passed")}})},e.prototype.step2Taken=function(){},e.prototype.changeState=function(e){},e}();t.OnboardingViewModelMock=y},1563:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(7),o=n(14),a=n(23),s=n(3),l=n(1476),c=n(1725),u=n(6);!function(e){function t(t){return t&&t.name===e.SEARCH_INPUT_NAME}function n(e,t){return(e.metaKey||e.ctrlKey)&&e.which===t&&!(e.shiftKey||e.altKey)}function a(e,t){return(e.metaKey||e.ctrlKey)&&e.shiftKey&&e.which===t&&!e.altKey}e.KEY_F=70,e.KEY_G=71,e.KEY_Esc=27,e.KEY_Enter=13,e.SEARCH_INPUT_NAME="search-input",e.isSearchInput=t,e.isCmdKeyPressed=n,e.isCmdShiftKeyPressed=a;var l=function(){function e(e){this.visible=i.Atom.create(!1),this.term=i.Atom.create(""),this.result=i.Atom.create(o.Option.of(e).map(function(e){return r.__assign({},e,{next:s.noop,prev:s.noop})}))}return e.prototype.select=function(){throw new Error("Method not implemented.")},e}();e.Mock=l}(t.SearchViewModel||(t.SearchViewModel={}));var d=function(){function e(e,t,n){this._ops=e,this._term=t,this.count=n.ranges.length,this.current=n.selected.getOrElse(0)+1,this._ops._highlightSelectedRange()}return e.prototype.next=function(){var e=this;this._ops._forceSearch(),this._ops._selectedPos.modify(function(t){return t.map(function(e){return e+1}).map(function(t){return t>e.count-1?0:t}).orElse(o.Some(0))}),this._ops._highlightSelectedRange(1===this.count)},e.prototype.prev=function(){var e=this;this._ops._forceSearch(),this._ops._selectedPos.modify(function(t){return t.map(function(e){return e-1}).map(function(t){return t<0?e.count-1:t}).orElse(o.Some(e.count-1))}),this._ops._highlightSelectedRange()},e.prototype.equals=function(e){return void 0!==e&&null!==e&&this.count===e.count&&this.current===e.current&&this._term===e._term},e.prototype.hashCode=function(){return o.hashCodeOfString(this._term)+this.count+(this.current<<4)},e}(),p=function(){function e(t,n,r){var p=this;this._ded=t,this._rangeManager=n,this._editorViewport=r,this._log=u.Monitoring.Logging.getLogger("SearchViewModel"),this._subs=[],this._forceSearchSubject=new a.Subject,this._rangesState=i.Atom.create({ranges:[],selected:o.Option.empty()}),this._selectedRange=this._rangesState.view(function(e){return e.selected.map(function(t){return e.ranges[t]})}),this._activeMark=i.Atom.create(o.Option.empty()),this.visible=i.Atom.create(!1),this.term=i.Atom.create(""),this.result=i.Atom.create(o.Option.empty()),this.select=function(){p._forceSearch(),p._rangesState.modify(function(e){var t=e.ranges,n=e.selected;return{ranges:t,selected:n.orElse(o.Some(0)).filter(function(){return s.notEmpty(t)})}}),p._highlightSelectedRange()},this.shutdown=function(){p.term.set(""),p._subs.forEach(function(e){return e.unsubscribe()}),p._subs=[]},this._selectedPos=this._rangesState.lens("selected"),this._forceSearch=function(){return p._forceSearchSubject.next()},this._highlightSelectedRange=function(e){void 0===e&&(e=!1);var t=p._selectedRange.get();e&&s.isOptionsEq(p._activeMark.get(),t,function(e,t){return e.rangeId===t.rangeId})&&p._ensureMarkInViewport(p._currentMark),p._activeMark.set(t)},this._removeRanges=function(e){p._activeMark.get().filter(function(t){return e.has(t.rangeId)}).forEach(function(){return p._activeMark.set(o.None)}),p._rangesState.modify(function(t){var n=t.ranges.filter(function(t){var n=t.rangeId;return!e.has(n)||(p._rangeManager.deregisterRange(n),!1)});return{ranges:n,selected:t.selected.filter(function(e){return e<n.length})}})},this._findRanges=function(e){return s.notEmpty(e)?p._searchTerm(p._ded.getText().toLowerCase(),e.toLowerCase()):[]},this._changeActiveMark=function(e){var t=e.prev,n=e.next;p._currentMark=null,t.forEach(function(e){p._ded.changeMarks([l.Mark.getRemoveAction({id:e.rangeId,range:function(){return e}})])}),n.forEach(function(e){p._currentMark=p._ded.changeMarks([l.Mark.getCreateAction({id:e.rangeId,range:function(){return e},order:0,classes:[c.mark]})])[0],p._ensureMarkInViewport(p._currentMark)})},this._subs.push(a.Observable.merge(this.term.filter(function(e){return e.length>3}).debounceTime(300),this.term.filter(function(e){return e.length<=3}).mapTo(""),this._forceSearchSubject.withLatestFrom(this.term,function(e,t){return t})).distinctUntilChanged().map(this._findRanges).subscribe(function(e){p._activeMark.set(o.None),p._replaceRanges(e)}),this._rangesState.map(function(e){return o.Some(e).filter(function(e){return s.notEmpty(e.ranges)}).map(function(e){return new d(p,p.term.get(),e)})}).subscribe(function(e){return p.result.set(e)}),this._rangesState.switchMap(function(e){var t=e.ranges;return s.notEmpty(t)?p._rangeManager.rangeChanged:a.Observable.empty()}).map(function(t){return t.filter(function(t){return t.type===e.SearchRange})}).map(function(e){return new Set(e.map(function(e){return e.rangeId}))}).subscribe(this._removeRanges),this._activeMark.scan(function(e,t){return{prev:e.next,next:t}},{prev:o.Option.empty(),next:o.Option.empty()}).subscribe(this._changeActiveMark)),this._subs.push(this._ded.dontFreezeWhen(this.visible,"search"),this.visible.skip(1).filter(function(e){return!e}).subscribe(function(){p.term.set("")})),s.registerDebugHelper("searchVM",this)}return e.prototype._searchTerm=function(t,n){for(var r=-1,i=[];;){if(!((r=t.indexOf(n,r+1))>-1))break;i.push(new l.Range(r,r+n.length,e.SearchRange))}return i},e.prototype._replaceRanges=function(t){var n=this;this._rangesState.modify(function(r){return r.ranges.forEach(function(e){return n._rangeManager.deregisterRange(e.rangeId)}),{ranges:t.map(function(t){return n._rangeManager.registerRange("search_"+n.term.get().replace(/\s*/g,"_")+"_"+e.searchMarkCount++,t)}),selected:t.length>0?o.Some(0):o.None}})},e.prototype._ensureMarkInViewport=function(e){if(e)try{var t=this._editorViewport.get(),n=t.top,r=t.bottom,i=e.viewportRect[0].top;(i<n+50||i>r-50)&&this._ded.scrollToMark(e,{paddingTop:500,animate:"fast"})}catch(e){this._log.error("Cannot scroll to mark",e)}},e.SearchRange="searchRange",e.searchMarkCount=0,e}();t.SearchViewModelImpl=p},1564:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(14),i=n(23),o=n(7),a=n(575),s=n(1464),l=n(1465),c=n(3),u=function(){function e(e,t,n){var l=this;this._pageVM=e,this._denaliEditorModel=t,this._documentModel=n,this._getTextAmount=function(){var e=l._denaliEditorModel.getText().trim().length;return 0===e?d.TextAmount.zero:e<=a.BIG_TEXT_SIZE?d.TextAmount.small:d.TextAmount.large},this._subs=[],this.successState=o.Atom.create(d.SuccessType.zero),this.textAmount=o.Atom.create(this._getTextAmount()),this._currentLens=this._pageVM.state.view(function(e){var t=e.currentLens;return{id:t.id,type:t.type}}),this._listenTextSize=function(){return l._currentLens.map(function(e){return e.id===s.Lens.SpecialId.Success}).switchMap(function(e){return e?l._denaliEditorModel.contentUpdated.startWith(void 0):i.Observable.empty()}).map(function(){return l._getTextAmount()}).subscribe(c.RxUtils.toAtom(l.textAmount))},this._prevLensType=this._currentLens.startWith(this._currentLens.get()).pairwise().map(function(e){var t=e[0];return e[1].id===s.Lens.SpecialId.Success?r.Some(t.type):r.None}),this._textAmountToSuccessType=function(e){return e===d.TextAmount.zero?d.SuccessType.zero:e===d.TextAmount.large?d.SuccessType.large:d.SuccessType.small},this._subs.push(this._listenTextSize(),this._listenSuccessStateChange())}return e.prototype.dispose=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},e.prototype._listenSuccessStateChange=function(){var e=this,t=function(t){return t===d.SuccessType.applied||t===d.SuccessType.zero?i.Observable.of(t):e._documentModel.checkingState.filter(function(e){return"checking"!==e}).first().mapTo(t)};return this._prevLensType.switchMap(function(n){return n.fold(function(){return i.Observable.empty()},function(n){return e.textAmount.map(e._textAmountToSuccessType).startWith(n===l.LensViewType.lensview?d.SuccessType.applied:e._textAmountToSuccessType(e.textAmount.get())).pairwise().map(function(e){var t=e[0],n=e[1];return t===d.SuccessType.applied&&n!==d.SuccessType.zero?t:n}).switchMap(function(e,n){return 0===n?i.Observable.of(e):t(e)})})}).subscribe(c.RxUtils.toAtom(this.successState))},e}();t.SuccessLensViewModelImpl=u;var d;!function(e){!function(e){e.zero="zero",e.small="small",e.large="large"}(e.TextAmount||(e.TextAmount={}));!function(e){e.zero="zero",e.small="small",e.large="large",e.applied="applied"}(e.SuccessType||(e.SuccessType={}))}(d=t.SuccessLensViewModel||(t.SuccessLensViewModel={}))},1565:function(e,t,n){"use strict";function r(e,t,n,r,s){void 0===r&&(r=[]),void 0===s&&(s=function(){});var l=new i.Subject,c=t.create.denaliAlertUndo(function(){return l.next(!1)},function(){return l.next(!0)},function(){switch(n.action){case o.FeedbackType.IGNORE:return{kind:"ignore"};case o.FeedbackType.ADD_TO_DICTIONARY:return{kind:"addToDictionary",word:n.replacement};case o.FeedbackType.WRONG_SUGGESTION:case o.FeedbackType.OFFENSIVE_CONTENT:return{kind:"report"};case o.FeedbackType.ACCEPTED:return{kind:"replace",word:n.replacement};case o.FeedbackType.SYNONYM_ACCEPTED:return{kind:"replaceSynonym"};case o.FeedbackType.DISMISS_BY_LENS:return{kind:"ignoreAll",alerts:r.length};case o.FeedbackType.LIKE:return{kind:"markAsHelpful"};case o.FeedbackType.DISLIKE:return{kind:"markAsNotHelpful"};default:throw new Error("Invalid undoable action "+n.action)}}()),u=t.show(c);e.flushChanges(),l.merge(i.Observable.timer(a).merge(e.contentUpdated).first().map(function(){return!0})).first().subscribe(function(e){t.hide(u),e?n.commit():s(n.undo())})}Object.defineProperty(t,"__esModule",{value:!0});var i=n(23),o=n(575),a=2e4;t.createUndoNotification=r},1566:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(3),a=n(1512),s=n(1578),l=function(e){return e.split("/").reduce(function(e,t,n){return 0!==n&&e.push(i.createElement("br",{key:n})),e.push(t),e},[])};t.Examples=function(e){var t=e.examples;return i.createElement("table",{className:s.wrapper},t.map(function(e,t){return i.createElement("tbody",{key:t,className:s.group},e.map(function(e,t){var n=e.text,c=e.title,u=e.color;return i.createElement("tr",{key:t,className:s.item},c.map(function(e){return i.createElement("td",{className:a.AlertExample.colorMatch(u)(s)},l(e))}).orNull(),i.createElement("td",r.__assign({colSpan:c.isEmpty()?2:void 0,className:s.content},o.ReactUtils.setInnerHTML(n))))}))}))}},1570:function(e,t){e.exports={wrapper:"_6fedd6f4-checkbox-wrapper",rectangle:"_7669c54d-checkbox-rectangle",rectangleFilledBlue:"_84079770-checkbox-rectangleFilledBlue _7669c54d-checkbox-rectangle",inputCheckbox:"_6d79043a-checkbox-inputCheckbox",svg:"_d769f305-checkbox-svg",svg2:"_b3c9a0d3-checkbox-svg2"}},1571:function(e,t){e.exports={wrapper:"_cd37be10-card-wrapper",animationWrapper:"_964f7677-card-animationWrapper",shade:"_162f340d-card-shade",focused2renderedMain:"_ee86c1f2-card-focused2renderedMain",fade:"_82ede6ed-card-fade",focused2renderedShade:"_99eaee2c-card-focused2renderedShade _162f340d-card-shade",focused2renderedShadeClockwise:"_659a7bd4-card-focused2renderedShadeClockwise _162f340d-card-shade",rendered2focusedMainBase:"_759b9df5-card-rendered2focusedMainBase",rendered2focusedMain:"_0f6d5ed6-card-rendered2focusedMain _759b9df5-card-rendered2focusedMainBase",rendered2focusedMainClockwise:"_c6568ed8-card-rendered2focusedMainClockwise _759b9df5-card-rendered2focusedMainBase",addedMain:"_5ea1523c-card-addedMain",rendered2removedShade:"_1214798e-card-rendered2removedShade _162f340d-card-shade",openedMain:"_284406e2-card-openedMain",closedMain:"_2247072b-card-closedMain"}},1572:function(e,t){e.exports={wrapper:"_408de300-card-wrapper _8d8a7136-typography-p2",activateBtn:"_277f2d80-card-activateBtn",contentWrapper:"_268be38b-card-contentWrapper",activeTopIcon:"_660d2189-card-activeTopIcon",activeBottomIcon:"_7022caee-card-activeBottomIcon",notRead:"_2de88599-card-notRead"}},1573:function(e,t){e.exports={wrapper:"_83cf92d4-dropdown-wrapper",list:"_26f4a41a-dropdown-list",transparent:"_71c5d680-dropdown-transparent",hidden:"_8baf22d7-dropdown-hidden",delimiter:"_25a2ffa0-dropdown-delimiter"}},1574:function(e,t){e.exports={container:"_c6bebaa8-inline-card-container",directionUp:"_dcfe7853-inline-card-directionUp",invisible:"_81b06f15-inline-card-invisible",invisibleAnimation:"_b1fe3b8f-inline-card-invisibleAnimation",visible:"_db0b3b30-inline-card-visible",visibleAnimation:"_c8ca5974-inline-card-visibleAnimation",card:"_bbcaab3e-inline-card-card",bigTitle:"_1914723c-inline-card-bigTitle",unknownWordTitle:"_3298fa05-inline-card-unknownWordTitle",inlineHeader:"_93593614-inline-card-inlineHeader",explanation:"_88886808-inline-card-explanation",footerButton:"_e0880657-inline-card-footerButton",footerButtonBig:"_5f0b4d01-inline-card-footerButtonBig _e0880657-inline-card-footerButton",footerButtonShort:"_d4933259-inline-card-footerButtonShort _e0880657-inline-card-footerButton",addToDictIcon:"_08f806d7-inline-card-addToDictIcon",dismissIcon:"_a86b0341-inline-card-dismissIcon",inlineWrappedList:"_dbfdd9e1-inline-card-inlineWrappedList",inlineHeaderOne:"_6043161b-inline-card-inlineHeaderOne _93593614-inline-card-inlineHeader",itemInsert:"_32837333-inline-card-itemInsert",itemRemove:"_b04c7fbd-inline-card-itemRemove",diff:"_1412e448-inline-card-diff",strike:"_c80effdf-inline-card-strike",maxWidthReached:"_52687f0b-inline-card-maxWidthReached"}},1575:function(e,t){e.exports={wrapper:"_57095d70-modal-wrapper",wrapperTopCenter:"_9ec0c273-modal-wrapperTopCenter",wrapperBottomRight:"_1920feaa-modal-wrapperBottomRight",wrapperCenter:"_a88cfac7-modal-wrapperCenter",wrapperLight:"_de655ea3-modal-wrapperLight _57095d70-modal-wrapper",wrapperDark:"_e35bbb9c-modal-wrapperDark _57095d70-modal-wrapper",wrapperTransparent:"_07894e4b-modal-wrapperTransparent _57095d70-modal-wrapper",modal:"_f0e0cdc1-modal-modal",header:"_0ba1bc92-modal-header",closeBtn:"_dc3e269c-modal-closeBtn",body:"_372e3284-modal-body",footer:"_238ba3c3-modal-footer",contentBase:"_0c354132-modal-contentBase",contentFaded:"_ce4a684f-modal-contentFaded _0c354132-modal-contentBase",content:"_07b61855-modal-content _0c354132-modal-contentBase",scroll:"_7ef25f50-modal-scroll"}},1576:function(e,t){},1577:function(e,t){e.exports={wrapper:"_f634ad72-navigation-wrapper",emptyWrapper:"_de242a71-navigation-emptyWrapper _f634ad72-navigation-wrapper",itemList:"_7d322556-navigation-itemList",lensBtnAnimate:"_437c38dc-navigation-lensBtnAnimate",growIn:"_7bfb80b5-navigation-growIn",counterWrapper:"_ac8b2ba3-navigation-counterWrapper",flowPosition:"_ec48f2a1-navigation-flowPosition",flowPositionAnimate:"_380a3908-navigation-flowPositionAnimate",lensesZero:"_0729fe6f-navigation-lensesZero",advancedBtn:"_cd94a72b-navigation-advancedBtn",fadeIn:"_c8fdcde9-navigation-fadeIn",advancedDelimiter:"_26e22e8d-navigation-advancedDelimiter _8462003f-navigation-delimiter",onboardingContainer:"_f8e98946-navigation-onboardingContainer",onboardingNotification:"_6f7b736e-navigation-onboardingNotification",triangleClassName:"_42a6dbdd-navigation-triangleClassName"}},1578:function(e,t){e.exports={wrapper:"_f784004c-examples-wrapper _8d8a7136-typography-p2",group:"_24267ef7-examples-group",item:"_3e77c65d-examples-item",baseBlock:"_c66b13e8-examples-baseBlock",title:"_06f6405c-examples-title _c66b13e8-examples-baseBlock",content:"_247c03a1-examples-content _c66b13e8-examples-baseBlock",red:"_7d31a719-examples-red _06f6405c-examples-title _c66b13e8-examples-baseBlock",green:"_5dc5917c-examples-green _06f6405c-examples-title _c66b13e8-examples-baseBlock",yellow:"_1d2dde5e-examples-yellow _06f6405c-examples-title _c66b13e8-examples-baseBlock",fallback:"_565b6c31-examples-fallback _06f6405c-examples-title _c66b13e8-examples-baseBlock"}},1579:function(e,t){e.exports={wrapper:"_97cabf1a-card-wrapper _98b130ea-card-fullCard",main:"_8d27c13e-card-main",description:"_87d01b5a-card-description _8d8a7136-typography-p2",buttons:"_6f8eb32f-card-buttons",dropdownContainer:"_4f5b8614-card-dropdownContainer",dictBtn:"_446ca4db-card-dictBtn",expandBtn:"_29193c84-card-expandBtn",lessIcon:"_51314209-card-lessIcon",more:"_6d605474-card-more",moreHidden:"_8370a536-card-moreHidden _6d605474-card-more",feedback:"_6fcd865d-card-feedback",feedbackLabel:"_d7d039f4-card-feedbackLabel",feedbackIcon:"_9349bc5b-card-feedbackIcon",feedbackButton:"_788543ea-card-feedbackButton",feedbackButtonInactive:"_48abbc9d-card-feedbackButtonInactive _788543ea-card-feedbackButton",onboardingNotification:"_6718b7dd-card-onboardingNotification",alignButtonHidden:"_e643170f-card-alignButtonHidden",alignButtonVisible:"_dabfd8f1-card-alignButtonVisible _e643170f-card-alignButtonHidden",title:"_ac5e6cb2-card-title _e635cd19-typography-p1"}},1580:function(e,t){e.exports={wrapper:"_549e6a9c-card-wrapper",highlightText:"_171f68e8-card-highlightText _014d72bc-card-text",text:"_014d72bc-card-text",critical:"_8857ed39-card-critical _171f68e8-card-highlightText _014d72bc-card-text",advanced:"_b7a46ff9-card-advanced _171f68e8-card-highlightText _014d72bc-card-text",dotCritical:"_c5d33786-card-dotCritical",dotAdvanced:"_6c34de61-card-dotAdvanced"}},1581:function(e,t){e.exports={button:"_08cb20d8-replacements_labels-button",text:"_375a3671-replacements_labels-text",bubble:"_4654ff20-replacements_labels-bubble",caps:"_44ec605d-replacements_labels-caps _08cb20d8-replacements_labels-button _375a3671-replacements_labels-text",round:"_8ac7c956-replacements_labels-round _08cb20d8-replacements_labels-button",blue:"_21413eb1-replacements_labels-blue _375a3671-replacements_labels-text _08cb20d8-replacements_labels-button _4654ff20-replacements_labels-bubble",white:"_cb0eb79b-replacements_labels-white _08cb20d8-replacements_labels-button _4654ff20-replacements_labels-bubble",groupSticky:"_ecef7e12-replacements_labels-groupSticky",grey:"_96e2ff4d-replacements_labels-grey _375a3671-replacements_labels-text _08cb20d8-replacements_labels-button _4654ff20-replacements_labels-bubble",flat:"_ed2ef32d-replacements_labels-flat _08cb20d8-replacements_labels-button _4654ff20-replacements_labels-bubble",sidebarFlat:"_181259c4-replacements_labels-sidebarFlat _44f85ed9-typography-header3 _08cb20d8-replacements_labels-button",linkBtn:"_3d82df25-replacements_labels-linkBtn",group:"_bc2bce1b-replacements_labels-group",list:"_920bb3c5-replacements_labels-list _1cd6b501-typography-paper",item:"_e93f5adc-replacements_labels-item",itemInsert:"_a5ecbb35-replacements_labels-itemInsert _e93f5adc-replacements_labels-item",diff:"_49a4a75e-replacements_labels-diff",itemRemove:"_f351a295-replacements_labels-itemRemove _e93f5adc-replacements_labels-item",deleteAll:"_9f952615-replacements_labels-deleteAll",crossed:"_d34cf47d-replacements_labels-crossed",deleteQuote:"_55b26aa3-replacements_labels-deleteQuote _d34cf47d-replacements_labels-crossed",deletePunctuation:"_eb5e8059-replacements_labels-deletePunctuation _d34cf47d-replacements_labels-crossed",deleteDoubleComma:"_85550cb6-replacements_labels-deleteDoubleComma",deleteApostrophe:"_261a33b0-replacements_labels-deleteApostrophe _d34cf47d-replacements_labels-crossed",deleteLetter:"_314bb99e-replacements_labels-deleteLetter",deletePunctuationBeforeLetter:"_b32369e7-replacements_labels-deletePunctuationBeforeLetter",itemOriginal:"_bece753d-replacements_labels-itemOriginal",itemOriginalContent:"_25a58297-replacements_labels-itemOriginalContent",or:"_2d4a575a-replacements_labels-or",arrowInsertsList:"_d7e14a20-replacements_labels-arrowInsertsList",inlineHeader:"_4a30cfec-replacements_labels-inlineHeader"}},1582:function(e,t){e.exports={mark_underline:"_5280dc59-components-mark_underline",markUndelineBorder:"_f8413685-components-markUndelineBorder",prevent_animation:"_12bb2f07-components-prevent_animation"}},1583:function(e,t){e.exports={editor:"_360a492d-denali-editor-editor",editorClipboard:"_02bfd642-denali-editor-editorClipboard"}},1587:function(e,t){},1603:function(e,t,n){n(1587),e.exports=n(1674)},1615:function(e,t){window.MutationObserver=window.MutationObserver||function(e){function t(e){this.i=[],this.m=e}function n(e){!function n(){var r=e.takeRecords();r.length&&e.m(r,e),e.h=setTimeout(n,t._period)}()}function r(t){var n,r={type:null,target:null,addedNodes:[],removedNodes:[],previousSibling:null,nextSibling:null,attributeName:null,attributeNamespace:null,oldValue:null};for(n in t)r[n]!==e&&t[n]!==e&&(r[n]=t[n]);return r}function i(e,t){var n=c(e,t);return function(i){var o,a=i.length;t.a&&3===e.nodeType&&e.nodeValue!==n.a&&i.push(new r({type:"characterData",target:e,oldValue:n.a})),t.b&&n.b&&s(i,e,n.b,t.f),(t.c||t.g)&&(o=l(i,e,n,t)),(o||i.length!==a)&&(n=c(e,t))}}function o(e,t){return t.value}function a(e,t){return"style"!==t.name?t.value:e.style.cssText}function s(t,n,i,o){for(var a,s,l={},c=n.attributes,u=c.length;u--;)a=c[u],s=a.name,o&&o[s]===e||(m(n,a)!==i[s]&&t.push(r({type:"attributes",target:n,attributeName:s,oldValue:i[s],attributeNamespace:a.namespaceURI})),l[s]=!0);for(s in i)l[s]||t.push(r({target:n,type:"attributes",attributeName:s,oldValue:i[s]}))}function l(t,n,i,o){function a(e,n,i,a,c){var u=e.length-1;c=-~((u-c)/2);for(var d,p,f;f=e.pop();)d=i[f.j],p=a[f.l],o.c&&c&&Math.abs(f.j-f.l)>=u&&(t.push(r({type:"childList",target:n,addedNodes:[d],removedNodes:[d],nextSibling:d.nextSibling,previousSibling:d.previousSibling})),c--),o.b&&p.b&&s(t,d,p.b,o.f),o.a&&3===d.nodeType&&d.nodeValue!==p.a&&t.push(r({type:"characterData",target:d,oldValue:p.a})),o.g&&l(d,p)}function l(n,i){for(var d,p,h,m,g,v=n.childNodes,_=i.c,b=v.length,y=_?_.length:0,w=0,E=0,k=0;E<b||k<y;)m=v[E],g=(h=_[k])&&h.node,m===g?(o.b&&h.b&&s(t,m,h.b,o.f),o.a&&h.a!==e&&m.nodeValue!==h.a&&t.push(r({type:"characterData",target:m,oldValue:h.a})),p&&a(p,n,v,_,w),o.g&&(m.childNodes.length||h.c&&h.c.length)&&l(m,h),E++,k++):(c=!0,d||(d={},p=[]),m&&(d[h=u(m)]||(d[h]=!0,-1===(h=f(_,m,k,"node"))?o.c&&(t.push(r({type:"childList",target:n,addedNodes:[m],nextSibling:m.nextSibling,previousSibling:m.previousSibling})),w++):p.push({j:E,l:h})),E++),g&&g!==v[E]&&(d[h=u(g)]||(d[h]=!0,-1===(h=f(v,g,E))?o.c&&(t.push(r({type:"childList",target:i.node,removedNodes:[g],nextSibling:_[k+1],previousSibling:_[k-1]})),w--):p.push({j:h,l:k})),k++));p&&a(p,n,v,_,w)}var c;return l(n,i),c}function c(e,t){var n=!0;return function e(r){var i={node:r};return!t.a||3!==r.nodeType&&8!==r.nodeType?(t.b&&n&&1===r.nodeType&&(i.b=p(r.attributes,function(e,n){return t.f&&!t.f[n.name]||(e[n.name]=m(r,n)),e})),n&&(t.c||t.a||t.b&&t.g)&&(i.c=d(r.childNodes,e)),n=t.g):i.a=r.nodeValue,i}(e)}function u(e){try{return e.id||(e.mo_id=e.mo_id||g++)}catch(t){try{return e.nodeValue}catch(e){return g++}}}function d(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r,e);return n}function p(e,t){for(var n={},r=0;r<e.length;r++)n=t(n,e[r],r,e);return n}function f(e,t,n,r){for(;n<e.length;n++)if((r?e[n][r]:e[n])===t)return n;return-1}t._period=30,t.prototype={observe:function(e,t){for(var r={b:!!(t.attributes||t.attributeFilter||t.attributeOldValue),c:!!t.childList,g:!!t.subtree,a:!(!t.characterData&&!t.characterDataOldValue)},o=this.i,a=0;a<o.length;a++)o[a].s===e&&o.splice(a,1);t.attributeFilter&&(r.f=p(t.attributeFilter,function(e,t){return e[t]=!0,e})),o.push({s:e,o:i(e,r)}),this.h||n(this)},takeRecords:function(){for(var e=[],t=this.i,n=0;n<t.length;n++)t[n].o(e);return e},disconnect:function(){this.i=[],clearTimeout(this.h),this.h=null}};var h=document.createElement("i");h.style.top=0;var m=(h="null"!=h.attributes.style.value)?o:a,g=1;return t}(void 0)},1616:function(e,t,n){"use strict";e.exports=n(1619)},1617:function(e,t,n){"use strict";var r=function(e){this.element=e,this.events={}};r.prototype.bind=function(e,t,n){void 0===this.events[e]&&(this.events[e]=[]);var r={capture:!1};this.events[e].push(t),this.element.addEventListener(e,t,n?Object.assign({},r,n):r)},r.prototype.unbind=function(e,t){var n=void 0!==t;this.events[e]=this.events[e].filter(function(r){return!(!n||r===t)||(this.element.removeEventListener(e,r,!1),!1)},this)},r.prototype.unbindAll=function(){for(var e in this.events)this.unbind(e)};var i=function(){this.eventElements=[]};i.prototype.eventElement=function(e){var t=this.eventElements.filter(function(t){return t.element===e})[0];return void 0===t&&(t=new r(e),this.eventElements.push(t)),t},i.prototype.bind=function(e,t,n,r){this.eventElement(e).bind(t,n,r)},i.prototype.unbind=function(e,t,n){this.eventElement(e).unbind(t,n)},i.prototype.unbindAll=function(){for(var e=0;e<this.eventElements.length;e++)this.eventElements[e].unbindAll()},i.prototype.once=function(e,t,n){var r=this.eventElement(e),i=function(e){r.unbind(t,i),n(e)};r.bind(t,i)},e.exports=i},1618:function(e,t,n){"use strict";e.exports=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return function(){return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}}()},1619:function(e,t,n){"use strict";var r=n(1621),i=n(1630),o=n(1631);e.exports={initialize:i,update:o,destroy:r}},1620:function(e,t,n){"use strict";e.exports=function(){return{handlers:["click-rail","drag-scrollbar","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipePropagation:!0,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!1,wheelSpeed:1,theme:"default"}}},1621:function(e,t,n){"use strict";var r=n(1471),i=n(1473),o=n(1466);e.exports=function(e){var t=o.get(e);t&&(t.event.unbindAll(),i.remove(t.scrollbarX),i.remove(t.scrollbarY),i.remove(t.scrollbarXRail),i.remove(t.scrollbarYRail),r.removePsClasses(e),o.remove(e))}},1622:function(e,t,n){"use strict";function r(e,t){function n(e){return e.getBoundingClientRect()}var r=function(e){e.stopPropagation()};t.event.bind(t.scrollbarY,"click",r),t.event.bind(t.scrollbarYRail,"click",function(r){var i=r.pageY-window.pageYOffset-n(t.scrollbarYRail).top,s=i>t.scrollbarYTop?1:-1;a(e,"top",e.scrollTop+s*t.containerHeight),o(e),r.stopPropagation()}),t.event.bind(t.scrollbarX,"click",r),t.event.bind(t.scrollbarXRail,"click",function(r){var i=r.pageX-window.pageXOffset-n(t.scrollbarXRail).left,s=i>t.scrollbarXLeft?1:-1;a(e,"left",e.scrollLeft+s*t.containerWidth),o(e),r.stopPropagation()})}var i=n(1466),o=n(1469),a=n(1470);e.exports=function(e){r(e,i.get(e))}},1623:function(e,t,n){"use strict";function r(e,t){function n(n){var i=r+n*t.railXRatio,a=Math.max(0,t.scrollbarXRail.getBoundingClientRect().left)+t.railXRatio*(t.railXWidth-t.scrollbarXWidth);t.scrollbarXLeft=i<0?0:i>a?a:i;var s=o.toInt(t.scrollbarXLeft*(t.contentWidth-t.containerWidth)/(t.containerWidth-t.railXRatio*t.scrollbarXWidth))-t.negativeScrollAdjustment;c(e,"left",s)}var r=null,i=null,s=function(t){n(t.pageX-i),l(e),t.stopPropagation(),t.preventDefault()},u=function(){o.stopScrolling(e,"x"),t.event.unbind(t.ownerDocument,"mousemove",s)};t.event.bind(t.scrollbarX,"mousedown",function(n){i=n.pageX,r=o.toInt(a.css(t.scrollbarX,"left"))*t.railXRatio,o.startScrolling(e,"x"),t.event.bind(t.ownerDocument,"mousemove",s),t.event.once(t.ownerDocument,"mouseup",u),n.stopPropagation(),n.preventDefault()})}function i(e,t){function n(n){var i=r+n*t.railYRatio,a=Math.max(0,t.scrollbarYRail.getBoundingClientRect().top)+t.railYRatio*(t.railYHeight-t.scrollbarYHeight);t.scrollbarYTop=i<0?0:i>a?a:i;var s=o.toInt(t.scrollbarYTop*(t.contentHeight-t.containerHeight)/(t.containerHeight-t.railYRatio*t.scrollbarYHeight));c(e,"top",s)}var r=null,i=null,s=function(t){n(t.pageY-i),l(e),t.stopPropagation(),t.preventDefault()},u=function(){o.stopScrolling(e,"y"),t.event.unbind(t.ownerDocument,"mousemove",s)};t.event.bind(t.scrollbarY,"mousedown",function(n){i=n.pageY,r=o.toInt(a.css(t.scrollbarY,"top"))*t.railYRatio,o.startScrolling(e,"y"),t.event.bind(t.ownerDocument,"mousemove",s),t.event.once(t.ownerDocument,"mouseup",u),n.stopPropagation(),n.preventDefault()})}var o=n(1471),a=n(1473),s=n(1466),l=n(1469),c=n(1470);e.exports=function(e){var t=s.get(e);r(e,t),i(e,t)}},1624:function(e,t,n){"use strict";function r(e,t){function n(n,r){var i=e.scrollTop;if(0===n){if(!t.scrollbarYActive)return!1;if(0===i&&r>0||i>=t.contentHeight-t.containerHeight&&r<0)return!t.settings.wheelPropagation}var o=e.scrollLeft;if(0===r){if(!t.scrollbarXActive)return!1;if(0===o&&n<0||o>=t.contentWidth-t.containerWidth&&n>0)return!t.settings.wheelPropagation}return!0}var r=!1;t.event.bind(e,"mouseenter",function(){r=!0}),t.event.bind(e,"mouseleave",function(){r=!1});var a=!1;t.event.bind(t.ownerDocument,"keydown",function(c){if(!(c.isDefaultPrevented&&c.isDefaultPrevented()||c.defaultPrevented)){var u=o.matches(t.scrollbarX,":focus")||o.matches(t.scrollbarY,":focus");if(r||u){var d=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(d){if("IFRAME"===d.tagName)d=d.contentDocument.activeElement;else for(;d.shadowRoot;)d=d.shadowRoot.activeElement;if(i.isEditable(d))return}var p=0,f=0;switch(c.which){case 37:p=c.metaKey?-t.contentWidth:c.altKey?-t.containerWidth:-30;break;case 38:f=c.metaKey?t.contentHeight:c.altKey?t.containerHeight:30;break;case 39:p=c.metaKey?t.contentWidth:c.altKey?t.containerWidth:30;break;case 40:f=c.metaKey?-t.contentHeight:c.altKey?-t.containerHeight:-30;break;case 33:f=90;break;case 32:f=c.shiftKey?90:-90;break;case 34:f=-90;break;case 35:f=c.ctrlKey?-t.contentHeight:-t.containerHeight;break;case 36:f=c.ctrlKey?e.scrollTop:t.containerHeight;break;default:return}l(e,"top",e.scrollTop-f),l(e,"left",e.scrollLeft+p),s(e),a=n(p,f),a&&c.preventDefault()}}})}var i=n(1471),o=n(1473),a=n(1466),s=n(1469),l=n(1470);e.exports=function(e){r(e,a.get(e))}},1625:function(e,t,n){"use strict";function r(e,t){function n(n,r){var i=e.scrollTop;if(0===n){if(!t.scrollbarYActive)return!1;if(0===i&&r>0||i>=t.contentHeight-t.containerHeight&&r<0)return!t.settings.wheelPropagation}var o=e.scrollLeft;if(0===r){if(!t.scrollbarXActive)return!1;if(0===o&&n<0||o>=t.contentWidth-t.containerWidth&&n>0)return!t.settings.wheelPropagation}return!0}function r(e){var t=e.deltaX,n=-1*e.deltaY;return void 0!==t&&void 0!==n||(t=-1*e.wheelDeltaX/6,n=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(t*=10,n*=10),t!==t&&n!==n&&(t=0,n=e.wheelDelta),e.shiftKey?[-n,-t]:[t,n]}function i(t,n){var r=e.querySelector("textarea:hover, select[multiple]:hover, .ps-child:hover");if(r){var i=window.getComputedStyle(r);if(![i.overflow,i.overflowX,i.overflowY].join("").match(/(scroll|auto)/))return!1;var o=r.scrollHeight-r.clientHeight;if(o>0&&!(0===r.scrollTop&&n>0||r.scrollTop===o&&n<0))return!0;var a=r.scrollLeft-r.clientWidth;if(a>0&&!(0===r.scrollLeft&&t<0||r.scrollLeft===a&&t>0))return!0}return!1}function s(s){var c=r(s),u=c[0],d=c[1];i(u,d)||(l=!1,t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(d?a(e,"top",e.scrollTop-d*t.settings.wheelSpeed):a(e,"top",e.scrollTop+u*t.settings.wheelSpeed),l=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(u?a(e,"left",e.scrollLeft+u*t.settings.wheelSpeed):a(e,"left",e.scrollLeft-d*t.settings.wheelSpeed),l=!0):(a(e,"top",e.scrollTop-d*t.settings.wheelSpeed),a(e,"left",e.scrollLeft+u*t.settings.wheelSpeed)),o(e),(l=l||n(u,d))&&(s.stopPropagation(),s.preventDefault()))}var l=!1;void 0!==window.onwheel?t.event.bind(e,"wheel",s):void 0!==window.onmousewheel&&t.event.bind(e,"mousewheel",s)}var i=n(1466),o=n(1469),a=n(1470);e.exports=function(e){r(e,i.get(e))}},1626:function(e,t,n){"use strict";function r(e,t){t.event.bind(e,"scroll",function(){o(e)})}var i=n(1466),o=n(1469);e.exports=function(e){r(e,i.get(e))}},1627:function(e,t,n){"use strict";function r(e,t){function n(e){var t=e.deltaX,n=-1*e.deltaY;return void 0!==t&&void 0!==n||(t=-1*e.wheelDeltaX/6,n=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(t*=10,n*=10),t!==t&&n!==n&&(t=0,n=e.wheelDelta),e.shiftKey?[-n,-t]:[t,n]}function r(r){var i=n(r),s=i[0],l=i[1];t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?l?a(e,"top",e.scrollTop-l*t.settings.wheelSpeed):a(e,"top",e.scrollTop+s*t.settings.wheelSpeed):t.scrollbarXActive&&!t.scrollbarYActive&&(s?a(e,"left",e.scrollLeft+s*t.settings.wheelSpeed):a(e,"left",e.scrollLeft-l*t.settings.wheelSpeed)):(a(e,"top",e.scrollTop-l*t.settings.wheelSpeed),a(e,"left",e.scrollLeft+s*t.settings.wheelSpeed)),o(e)}void 0!==window.onwheel?t.event.bind(e,"wheel",r,{passive:!0}):void 0!==window.onmousewheel&&t.event.bind(e,"mousewheel",r,{passive:!0})}var i=n(1466),o=n(1469),a=n(1470);e.exports=function(e){r(e,i.get(e))}},1628:function(e,t,n){"use strict";function r(e,t){function n(){var e=window.getSelection?window.getSelection():document.getSelection?document.getSelection():"";return 0===e.toString().length?null:e.getRangeAt(0).commonAncestorContainer}function r(){c||(c=setInterval(function(){if(!o.get(e))return void clearInterval(c);s(e,"top",e.scrollTop+u.top),s(e,"left",e.scrollLeft+u.left),a(e)},50))}function l(){c&&(clearInterval(c),c=null),i.stopScrolling(e)}var c=null,u={top:0,left:0},d=!1;t.event.bind(t.ownerDocument,"selectionchange",function(){e.contains(n())?d=!0:(d=!1,l())}),t.event.bind(window,"mouseup",function(){d&&(d=!1,l())}),t.event.bind(window,"keyup",function(){d&&(d=!1,l())}),t.event.bind(window,"mousemove",function(t){if(d){var n={x:t.pageX,y:t.pageY},o={left:e.offsetLeft,right:e.offsetLeft+e.offsetWidth,top:e.offsetTop,bottom:e.offsetTop+e.offsetHeight};n.x<o.left+3?(u.left=-5,i.startScrolling(e,"x")):n.x>o.right-3?(u.left=5,i.startScrolling(e,"x")):u.left=0,n.y<o.top+3?(o.top+3-n.y<5?u.top=-5:u.top=-20,i.startScrolling(e,"y")):n.y>o.bottom-3?(n.y-o.bottom+3<5?u.top=5:u.top=20,i.startScrolling(e,"y")):u.top=0,0===u.top&&0===u.left?l():r()}})}var i=n(1471),o=n(1466),a=n(1469),s=n(1470);e.exports=function(e){r(e,o.get(e))}},1629:function(e,t,n){"use strict";function r(e,t,n,r){function i(n,r){var i=e.scrollTop,o=e.scrollLeft,a=Math.abs(n),s=Math.abs(r);if(s>a){if(r<0&&i===t.contentHeight-t.containerHeight||r>0&&0===i)return!t.settings.swipePropagation}else if(a>s&&(n<0&&o===t.contentWidth-t.containerWidth||n>0&&0===o))return!t.settings.swipePropagation;return!0}function l(t,n){s(e,"top",e.scrollTop-n),s(e,"left",e.scrollLeft-t),a(e)}function c(){y=!0}function u(){y=!1}function d(e){return e.targetTouches?e.targetTouches[0]:e}function p(e){return!(!e.targetTouches||1!==e.targetTouches.length)||!(!e.pointerType||"mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE)}function f(e){if(p(e)){w=!0;var t=d(e);g.pageX=t.pageX,g.pageY=t.pageY,v=(new Date).getTime(),null!==b&&clearInterval(b),e.stopPropagation()}}function h(e){if(!w&&t.settings.swipePropagation&&f(e),!y&&w&&p(e)){var n=d(e),r={pageX:n.pageX,pageY:n.pageY},o=r.pageX-g.pageX,a=r.pageY-g.pageY;l(o,a),g=r;var s=(new Date).getTime(),c=s-v;c>0&&(_.x=o/c,_.y=a/c,v=s),i(o,a)&&(e.stopPropagation(),e.preventDefault())}}function m(){!y&&w&&(w=!1,t.settings.swipeEasing&&(clearInterval(b),b=setInterval(function(){return o.get(e)&&(_.x||_.y)?Math.abs(_.x)<.01&&Math.abs(_.y)<.01?void clearInterval(b):(l(30*_.x,30*_.y),_.x*=.8,void(_.y*=.8)):void clearInterval(b)},10)))}var g={},v=0,_={},b=null,y=!1,w=!1;n?(t.event.bind(window,"touchstart",c),t.event.bind(window,"touchend",u),t.event.bind(e,"touchstart",f),t.event.bind(e,"touchmove",h),t.event.bind(e,"touchend",m)):r&&(window.PointerEvent?(t.event.bind(window,"pointerdown",c),t.event.bind(window,"pointerup",u),t.event.bind(e,"pointerdown",f),t.event.bind(e,"pointermove",h),t.event.bind(e,"pointerup",m)):window.MSPointerEvent&&(t.event.bind(window,"MSPointerDown",c),t.event.bind(window,"MSPointerUp",u),t.event.bind(e,"MSPointerDown",f),t.event.bind(e,"MSPointerMove",h),t.event.bind(e,"MSPointerUp",m)))}var i=n(1471),o=n(1466),a=n(1469),s=n(1470);e.exports=function(e){if(i.env.supportsTouch||i.env.supportsIePointer){r(e,o.get(e),i.env.supportsTouch,i.env.supportsIePointer)}}},1630:function(e,t,n){"use strict";var r=n(1466),i=n(1469),o={"click-rail":n(1622),"drag-scrollbar":n(1623),keyboard:n(1624),wheel:n(1625),passiveWheel:n(1627),touch:n(1629),selection:n(1628)},a=n(1626);e.exports=function(e,t){e.classList.add("ps");var n=r.add(e,"object"==typeof t?t:{});e.classList.add("ps--theme_"+n.settings.theme),n.settings.handlers.forEach(function(t){o[t](e)}),a(e),i(e)}},1631:function(e,t,n){"use strict";var r=n(1471),i=n(1473),o=n(1466),a=n(1469),s=n(1470);e.exports=function(e){var t=o.get(e);t&&(t.negativeScrollAdjustment=t.isNegativeScroll?e.scrollWidth-e.clientWidth:0,i.css(t.scrollbarXRail,"display","block"),i.css(t.scrollbarYRail,"display","block"),t.railXMarginWidth=r.toInt(i.css(t.scrollbarXRail,"marginLeft"))+r.toInt(i.css(t.scrollbarXRail,"marginRight")),t.railYMarginHeight=r.toInt(i.css(t.scrollbarYRail,"marginTop"))+r.toInt(i.css(t.scrollbarYRail,"marginBottom")),i.css(t.scrollbarXRail,"display","none"),i.css(t.scrollbarYRail,"display","none"),a(e),s(e,"top",e.scrollTop),s(e,"left",e.scrollLeft),i.css(t.scrollbarXRail,"display",""),i.css(t.scrollbarYRail,"display",""))}},1633:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(23),s=n(122),l=n(3),c=n(310),u=n(1603),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isDropZoneVisible=o.Atom.create(!1),t.isDropZoneHovered=o.Atom.create(!1),t.timeout=void 0,t.isDocumentUploading=o.Atom.create(!1),t.onLeave=function(){t.isDropZoneVisible.set(!1),t.isDropZoneHovered.set(!1)},t.onDragOver=function(e){return t.isDropZoneVisible.set(!0),t.isDropZoneHovered.set(t.props.canDrop(e)),t.timeout&&clearTimeout(t.timeout),t.timeout=setTimeout(function(){return t.onLeave()},100),e.stopPropagation(),e.preventDefault(),!1},t.onDrop=function(e){e.preventDefault(),e.stopPropagation(),t.onLeave(),t.props.canDrop(e)&&(t.isDocumentUploading.set(!0),t.props.documentUpload.upload(e.dataTransfer.files,t.props.showNotification).then(function(){return t.isDocumentUploading.set(!1)}))},t._subs=[],t}return r.__extends(t,e),t.prototype.componentDidMount=function(){this._subs=[a.Observable.fromEvent(document,"dragover").subscribe(this.onDragOver),a.Observable.fromEvent(document,"drop").subscribe(this.onDrop)]},t.prototype.componentWillUnmount=function(){this._unsubscribe(),this.props.documentUpload.navigated()},t.prototype.render=function(){return this.props.render(this.isDropZoneVisible,this.isDropZoneHovered,this.isDocumentUploading)},t.prototype._unsubscribe=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},t}(s.BaseComponent);t.DropZoneBase=d;var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.render=function(){var e=this;return i.createElement(d,r.__assign({},this.props,{canDrop:function(e){return l.DOM.hasParentWithClassName(e.target,u.dropzone)},render:function(t,n,a){return i.createElement(o.F.div,r.__assign({},o.classes(u.dropZoneElement,t.map(function(e){return e&&u.active}),n.map(function(e){return e&&u.hovered}),a.map(function(e){return e&&o.classes(u.active,u.hovered).className}))),i.createElement(o.F.div,{className:u.dropzone},a.map(function(t){return t?i.createElement("div",{className:u.progressContainer,key:"uploading"},i.createElement("div",{className:u.message},e.context.textResources.base.modalUploadingDocumentText),i.createElement(c.Spinner,{size:18})):i.createElement("div",{className:u.dropzoneMiddleblock,key:"dropAFile"},"Drop a text file here")})))}}))},t}(s.BaseComponent);t.DropZone=p},1639:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(14),s=n(122),l=n(1571);t.CardWrapper=function(e){var t=e.children;return i.createElement(o.F.div,{className:l.wrapper},t)};var c=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t._subs=[],t._isFocused=o.Atom.create(!1),t}return r.__extends(n,e),n.prototype.shouldComponentUpdate=function(){return!1},n.prototype.componentDidMount=function(){var e=this;this._subs.push(this.props.cardState.subscribe(function(t){var n=(t[0],t[1]);return e._isFocused.set("focused"===n.transition.type||"expanded"===n.transition.type)}))},n.prototype.componentWillUnmount=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},n.prototype._transitionClassMapper=function(e){var t=e.from,n=e.transition;return e.incomplete?t.map(function(e){switch(e){case"added":case"rendered":switch(n.type){case"added":return{main:l.addedMain};case"focused":return{main:n.clockwise?l.rendered2focusedMainClockwise:l.rendered2focusedMain};case"removed":return{shade:l.rendered2removedShade};default:return{}}case"expanded":case"focused":switch(n.type){case"rendered":return{main:l.focused2renderedMain,shade:n.clockwise?l.focused2renderedShadeClockwise:l.focused2renderedShade};case"fadeOut":return{main:l.closedMain};case"removed":return{main:"",shade:n.clockwise?l.focused2renderedShadeClockwise:l.focused2renderedShade};default:return{}}case"removed":switch(n.type){case"added":return{main:l.addedMain};default:return{}}default:return{}}}).getOrElseL(function(){switch(n.type){case"added":return{main:l.addedMain};case"focused":return{main:l.openedMain};default:return{}}}):{}},n.prototype._stateToElement=function(e){switch(e){case"added":case"rendered":return this.props.renderMiniCard();case"focused":case"expanded":case"fadeOut":return this.props.renderFullCard();default:return null}},n.prototype.render=function(){var e=this,n=this.props,r=n.cardsViewModel,s=n.cardState;return i.createElement(t.CardWrapper,null,s.distinctUntilChanged(function(e,t){var n=e[0],r=e[1],i=t[0],o=t[1];return n.cardId===i.cardId&&r.transition===o.transition}).map(function(t){var n=t[0],s=t[1];if(!s.incomplete)return i.createElement("div",{key:"main"},e._stateToElement(s.transition.type));var c=e._transitionClassMapper(s),u=c.main,d=c.shade,p=o.Atom.create(s.from.filter(function(){return void 0!==d}));return!u&&p.get().isEmpty()&&requestAnimationFrame(function(){return r.completeTransitionTo.next({card:n,transitionId:s.transitionId})}),i.createElement(o.F.div,{role:"animation-wrapper",className:l.animationWrapper},p.view(function(t){return t.map(function(t){return i.createElement("div",{className:d,key:"shade",onAnimationEnd:function(){r.completeTransitionTo.next({card:n,transitionId:s.transitionId}),e.context.appRouter.query.get("debug").contains("animation")||requestAnimationFrame(function(){return p.set(a.None)})}},e._stateToElement(t))}).orNull()}),i.createElement("div",{className:u,key:"main",onAnimationEnd:function(){return r.completeTransitionTo.next({card:n,transitionId:s.transitionId})}},e._stateToElement(s.transition.type)))}))},n}(s.BaseComponent);t.BaseCard=c},1640:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(14),a=n(7),s=n(1463),l=n(573),c=n(1572),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._isHighlighted=!1,t._highlightAlert=function(e){t._isHighlighted=e.nonEmpty(),t.props.marksVM.highlightedAlertBuffered.next(e)},t}return r.__extends(t,e),t.prototype.componentWillUnmount=function(){this._isHighlighted&&this._highlightAlert(o.None)},t.prototype.render=function(){var e=this,t=this.props,n=t.getActiveAlert,u=t.cardId,d=t.pageViewModel,p=t.children,f=t.className;return i.createElement(a.F.div,r.__assign({"data-aid":u,onClick:function(){return d.switchToAlert(n(),s.AlertActionSource.sidebar,"lensOrder")},onMouseEnter:function(){return e._highlightAlert(o.Some(n()))},onMouseLeave:function(){return e._highlightAlert(o.None)}},a.classes(f,c.wrapper,c.notRead)),i.createElement("div",{className:c.contentWrapper},p),i.createElement("div",{className:c.activateBtn},i.createElement(l.Icon.More,{className:c.activeTopIcon}),i.createElement(l.Icon.More,{className:c.activeBottomIcon})))},t}(i.Component);t.BaseMiniCard=u},1641:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(1718),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._rendered=o.Atom.create(!1),t}return r.__extends(t,e),t.prototype.componentDidMount=function(){var e=this;requestAnimationFrame(function(){return e._rendered.set(!0)})},t.prototype.render=function(){var e=this.props.offset,t=this.props.theme||a,n=t.flowPosition,s=t.flowPositionAnimate;return i.createElement(o.F.div,r.__assign({style:{transform:"translate3d(0, "+e+", 0)"}},o.classes(n,this._rendered.view(function(e){return e&&s}))),this.props.children)},t}(i.Component);t.FlowPosition=s},1643:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(23),a=n(7),s=n(1489),l=n(3),c=n(1722),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.render=function(){var e=this.props,t=e.onMount,n=e.children;return i.createElement("div",r.__assign({key:"regularCard"},a.classes(c.card,c.fakeCard),{style:{transform:"translate3d(0px, 0px, 0px)"},ref:t}),n)},t}(i.Component),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onMount=function(e){var n=t.props,r=n.type,i=n.onMount,o=n.card.activeAlert.id;e&&i&&("active"===r?i(e,{type:"active",id:o}):"regular"===r&&i(e,{type:"regular"}))},t._setEl=function(e){t._el=e},t}return r.__extends(t,e),t.prototype.shouldComponentUpdate=function(e){var t=e.card,n=e.forceUpdate,r=this.props.card;return!0===n||t.absTop!==r.absTop||t.animate!==r.animate||t.visible!==r.visible},t.prototype.componentDidUpdate=function(){this._onMount(this._el)},t.prototype.componentDidMount=function(){this._onMount(this._el)},t.prototype.render=function(){var e=this.props,t=e.card,n=e.children,o=e.type;return i.createElement("div",r.__assign({key:t.cardId,"data-id":t.cardId,"data-top":t.absTop},a.classes(c.card,t.animate&&c.cardAnimate,!t.visible&&c.cardHidden),{style:{transform:"translate3d(0px, "+t.absTop+"px, 0px)",zIndex:"active"===o?1:0},ref:this._setEl}),n)},t}(i.Component),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onBaseComponentMount=function(e,n){"active"===n.type?t.props.setActive(e,n.id):t.props.setRegular(e)},t._scrolling=a.Atom.create(!1),t._onScroll=new o.Subject,t}return r.__extends(t,e),t.prototype._renderActive=function(e){var t=this;return e.map(function(e){return i.createElement(d,{key:e.cardId,card:e,forceUpdate:!0,type:"active",onMount:t._onBaseComponentMount},t.props.renderCard(e))}).orNull()},t.prototype._renderRegular=function(e){return i.createElement(d,{key:e.cardId,card:e,forceUpdate:!1,type:void 0,onMount:this._onBaseComponentMount},this.props.renderCard(e))},t.prototype.componentDidMount=function(){o.Observable.merge(this._onScroll.debounceTime(100).mapTo(!1),this._onScroll.mapTo(!0)).subscribe(l.RxUtils.toAtom(this._scrolling))},t.prototype.render=function(){var e=this,t=this.props,n=t.renderFake,l=t.className,d=t.lensedVM,p=t.children,f=t.onMount,h=t.onTitleMount;return i.createElement(s.ScrollBarY,r.__assign({name:"cards"},a.classes(l,c.scroller),{update:o.Observable.merge(d.totalHeight,d.scrollUpdated),allowHover:!0,onMount:f,onScroll:this._onScroll}),i.createElement(a.F.div,r.__assign({},a.classes(this._scrolling.view(function(e){return e&&c.scrolling}),c.scrollContent),{style:d.totalHeight.map(function(e){return{height:e+"px"}})}),i.createElement(u,{onMount:function(t){return t&&e._onBaseComponentMount(t,{type:"regular"})}},n()),i.createElement("div",{ref:h,className:c.basicCard},p),d.viewState.map(function(t){var n=t.cards,r=t.active;return n.map(function(t){return r.exists(function(e){return e.cardId===t.cardId})?e._renderActive(r):e._renderRegular(t)})}).startWith(null)))},t}(i.Component);t.Scroller=p},1644:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(13),i=n(1561),o=n(1771),a=n(1772),s=n(1561);t.Gradient=s.Gradient,t.CheckMark=function(){return r.createElement("svg",{className:o.checkMark,viewBox:"0 0 16 16"},r.createElement("path",{fill:"#3DDAB9",transform:"translate(0,-3)",d:"M14.1722359,5.90997604 L6.89276218,13.2076121 L4.93382142,11.2437838 C4.61892893,10.9281056 4.10641463,10.9261431 3.78908868,11.2394005 C3.47176274,11.5526578 3.46979003,12.0625107 3.78468251,12.3781889 L6.31819272,14.9180202 C6.63480066,15.2354181 7.15072369,15.2354181 7.46733163,14.9180202 L15.085059,7.28128652 C15.6693569,8.39227408 16,9.65750796 16,11 C16,15.418087 12.4184348,19 8,19 C3.58191304,19 0,15.418087 0,11 C0,6.58156522 3.58191304,3 8,3 C10.4848029,3 12.7049358,4.13271295 14.1722359,5.90997604 Z"}))},t.RadialProgress=function(e){var t=e.percentage,n=e.color,o=e.description;return r.createElement(i.RadialProgressBar,{percentage:t,color:n,description:o,theme:a})}},1645:function(e,t,n){"use strict";function r(e,t){var n=e.state,r=e.lensType,l=e.animate,c=e.useHighHighlights;void 0===t&&(t=a);var u=[o.Lens.fullTypeMatch(r)(t)];switch(n){case i.MarkAlertVisualState.faded:l&&u.push(t.markAnimated);break;case i.MarkAlertVisualState.active:u.push(t.markActive),l&&u.push(t.markAnimated);break;case i.MarkAlertVisualState.highlighted:u.push(c?t.markSelectedHigh:t.markSelected,t.markActive),l||u.push(t.noAnimation);break;case i.MarkAlertVisualState.hidden:u.push(t.markHidden);break;case i.MarkAlertVisualState.applied:u.push(t.markApplied);break;case i.MarkAlertVisualState.initial:case i.MarkAlertVisualState.disposed:break;default:s.assertNever(n)}return u}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1495),o=n(1464),a=n(1500),s=n(3);t.getMarkClasses=r},1646:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(1476),o=n(1463),a=n(3),s=n(1464),l=n(23),c=n(6),u=n(1495),d=n(1645),p=n(14),f=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.alert=e,this._bulkFactory=t,this._useHighHighlights=n,this._log=c.Monitoring.Logging.getLogger("markAlert"),this._currentState=u.MarkAlertState.from(u.MarkAlertVisualState.initial),this._scheduledState=u.MarkAlertState.from(u.MarkAlertVisualState.active),this._marksMap=new Map,this._shouldInitMark=!0,this._dispose=function(){r._marksMap.clear(),r.alert.dispose()},this._disposeIfEmpty=function(){0===r._marksMap.size&&r._dispose()}}return Object.defineProperty(e.prototype,"_mark",{get:function(){return this._marksMap.size>0?this._marksMap.values().next().value:p.None},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scheduledState",{get:function(){return this._scheduledState},enumerable:!0,configurable:!0}),e.prototype.scheduleApply=function(e){return this._throwWhenNotAllowedState(e),this._throwWhenInFinaleState(e),a.invariant(e!==u.MarkAlertVisualState.initial,"Cannot schedule change "+this.alert.id+" from "+this._currentState.visualState+" to initial state"),this._currentState.visualState!==u.MarkAlertVisualState.initial||e!==u.MarkAlertVisualState.disposed&&e!==u.MarkAlertVisualState.applied?this._currentState.visualState!==e||this._currentState.updateRanges?this._scheduledState=u.MarkAlertState.updateVisualState(this._currentState,e):this._scheduledState=null:(this._scheduledState=null,this._currentState=u.MarkAlertState.from(u.MarkAlertVisualState.disposed),this._dispose()),this},e.prototype.scheduleUpdate=function(){this._scheduledState=u.MarkAlertState.updateRanges(this._scheduledState||this._currentState,!0)},e.prototype.apply=function(e){var t=this;return this._throwWhenNotAllowedState(e),this._throwWhenInFinaleState(e),e&&this.scheduleApply(e),this.pending?(this.rangeChange().forEach(function(e){t._handleBasicEvent(e.rawMark)}),this.change().filter(function(e){return e.rawMark.length>0}).forEach(function(e){"apply"===e.action?t._handleApplyEvent(e.rawMark):t._handleBasicEvent(e.rawMark)}),this._mark):(a.invariant(this.is(u.MarkAlertVisualState.disposed)||this.not(u.MarkAlertVisualState.disposed)&&!this._shouldInitMark,"Mark "+this.alert.id+" is in invalid state "+this._currentState.visualState),this._mark)},e.prototype._iterateOverMarkAlerts=function(e,t){var n=0;e.forEach(function(e){var r=e.rawMark,i=e.ma;r.forEach(function(e){"create"===e.action?i._setMarkAndCheckFinaleState(e.id,p.Option.of(t[n])):"remove"===e.action&&i._removeMark(e.id),n++}),i._disposeIfEmpty()})},e.prototype._handleMultipleHighlights=function(e,t){var n=this,r=e.map(function(e){return[e,t(e)]}).filter(function(e){e[0];return e[1].filter(function(e){return 0!==e.rawMark.length||(n._log.warn("rawAction must have rawMark array",{rawAction:e.action}),!1)}).nonEmpty()}).map(function(e){return{ma:e[0],rawMark:e[1].map(function(e){return e.rawMark}).get()}});if(0!==r.length){var i=a.ArrayUtils.flatMap(r.map(function(e){return e.rawMark})),o=this._bulkFactory(i);this._iterateOverMarkAlerts(r,o)}},e.prototype.applyWith=function(e){var t=e.concat([this]);this._handleMultipleHighlights(t,function(e){return e.rangeChange()}),this._handleMultipleHighlights(t,function(e){return e.change().map(function(e){if("apply"===e.action)throw new a.InvariantError("'Apply' action cannot be applied in bulk");return e})})},Object.defineProperty(e.prototype,"id",{get:function(){return this.alert.id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mark",{get:function(){try{return this._throwWhenInFinaleState(),this._shouldInitMark?(this._shouldInitMark=!1,this.apply()):this._mark}catch(e){return p.None}},enumerable:!0,configurable:!0}),e.prototype._setMarkAndCheckFinaleState=function(e,t){this._throwWhenInFinaleState(),this._setMark(e,t)},e.prototype._setMark=function(e,t){this._shouldInitMark=!1,this._marksMap.set(e,t)},e.prototype._removeMark=function(e){this._marksMap.delete(e)},Object.defineProperty(e.prototype,"pending",{get:function(){return null!==this._scheduledState&&(this._scheduledState.visualState!==this._currentState.visualState||this._scheduledState.updateRanges)},enumerable:!0,configurable:!0}),e.prototype.is=function(e){return this._currentState.visualState===e},e.prototype.not=function(e){return this._currentState.visualState!==e},e.prototype.canBeChanged=function(e){return e&&this._currentState.visualState===u.MarkAlertVisualState.applied?e===u.MarkAlertVisualState.disposed:this.not(u.MarkAlertVisualState.applied)&&this.not(u.MarkAlertVisualState.disposed)},e.prototype.isOrWillBe=function(e){return null===this._scheduledState?this._currentState.visualState===e:this._scheduledState.visualState===e},e.prototype.willBe=function(e){return this._scheduledState&&this._scheduledState.visualState===e},e.prototype.change=function(){a.invariant(this.pending,"Next state should be scheduled to change it from "+this._currentState+" for "+this.alert.id);var e=this._transition();return e.from.visualState===e.to.visualState?p.None:p.Some(this._raw(e))},e.prototype.rangeChange=function(){return this._rawRangeUpdate(this._getTransition())},e.prototype._handleBasicEvent=function(e){var t=this,n=this._bulkFactory(e);e.forEach(function(e,r){if("remove"===e.action)t._removeMark(e.id);else{var i=p.Option.of(t._marksMap.get(e.id)).flatMap(function(e){return e}).orElseL(function(){return p.Option.of(n[r])});t._setMark(e.id,i)}}),this._disposeIfEmpty()},e.prototype._handleApplyEvent=function(e){var t=this,n=function(){return t.alert.hideApplied()};this._handleBasicEvent(e),requestAnimationFrame(function(){t.mark.fold(function(){l.Observable.timer(150).subscribe(n)},function(e){try{l.Observable.merge(l.Observable.timer(300),e.fromEvent("animationend"),e.fromEvent("animationcancel")).first().subscribe(n)}catch(e){t._log.error("Cannot animate applied alert",e,{alertId:t.alert.id,currentState:t._currentState}),n()}})})},e.prototype._getTransition=function(){return a.invariant(this.pending,"Next state should be scheduled to change it from "+this._currentState+" for "+this.alert.id),{from:this._currentState,to:this._scheduledState}},e.prototype._transition=function(){var e=this._getTransition();return this._currentState=r.__assign({},e.to,{updateRanges:!1}),this._scheduledState=null,e},e.prototype._rawRangeUpdate=function(e){var t=this;return e.to.updateRanges&&this.alert.hasNewRangeForUpdate?e.from.visualState===u.MarkAlertVisualState.initial||e.to.visualState===u.MarkAlertVisualState.disposed&&e.from.visualState===u.MarkAlertVisualState.applied?(this.alert.applyPendingRangesUpdate(),p.None):this.alert.applyPendingRangesUpdate().filter(function(e){var t=e.addedHighlightedRanges,n=e.removedHighlightedRanges;return t.length>0||n.length>0}).map(function(n){var r=n.addedHighlightedRanges,o=n.removedHighlightedRanges,a=s.Lens.getSortOrder(t.alert.alertType);return{action:"updateRanges",rawMark:o.map(function(e){return i.Mark.getRemoveAction({id:e.rangeId,range:function(){return e}},i.Mark.RemoveType.partial)}).concat(r.map(function(n){return i.Mark.getCreateAction({id:n.rangeId,range:function(){return n},classes:d.getMarkClasses({state:e.from.visualState,lensType:t.alert.alertType,animate:!1,useHighHighlights:t._useHighHighlights}),order:a})}))}}):p.None},e.prototype._raw=function(e){var t=this,n=this._classes(e),o=s.Lens.getSortOrder(this.alert.alertType),a=[this.alert.highlightRange].map(function(e){return{id:e.rangeId,range:function(){return e},order:o}});if(e.from.visualState===u.MarkAlertVisualState.initial)return{action:"create",rawMark:a.map(function(e){return i.Mark.getCreateAction(r.__assign({},e,{classes:n}))})};if(e.to.visualState===u.MarkAlertVisualState.disposed){return{action:"remove",rawMark:(e.from.visualState===u.MarkAlertVisualState.applied?[{id:this.alert.id+"_applied",range:function(){return t.alert.appliedRange.get()}}]:a).map(function(e){return i.Mark.getRemoveAction(e)})}}return e.to.visualState===u.MarkAlertVisualState.applied?{action:"apply",rawMark:a.map(function(e){return i.Mark.getRemoveAction(e)}).concat([i.Mark.getCreateAction({id:this.alert.id+"_applied",range:function(){return t.alert.appliedRange.get()},classes:n,order:o})])}:{action:"update",rawMark:a.map(function(e){return i.Mark.getUpdateAction(e,n)})}},e.prototype._classes=function(e){var t=e.from,n=e.to;return d.getMarkClasses({state:n.visualState,lensType:this.alert.alertType,animate:t.visualState===u.MarkAlertVisualState.initial||t.visualState===u.MarkAlertVisualState.hidden||n.visualState===u.MarkAlertVisualState.highlighted,useHighHighlights:this._useHighHighlights})},e.prototype._throwWhenNotAllowedState=function(e){a.invariant(this.alert instanceof o.AlertImpl||(!e||e!==u.MarkAlertVisualState.applied),"Applied state isn't allowed for "+this.alert.id)},e.prototype._throwWhenInFinaleState=function(e){a.invariant(e&&this.is(u.MarkAlertVisualState.applied)?e&&e===u.MarkAlertVisualState.disposed:this.not(u.MarkAlertVisualState.disposed),"'"+this._currentState.visualState+"' MarkAlert '"+this.alert.id+"' cannot be changed"+(e?" to '"+e+"' ":""))},e.prototype.toJSON=function(){return{current:this._currentState,scheduled:this._scheduledState,mark:{id:this._mark.map(function(e){return e.id}).getOrElse(void 0),range:this._mark.map(function(e){return e.range}).getOrElse(void 0)},alert:this.alert}},e}();t.MarkAlertII=f},1647:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(14),i=n(1463),o=n(3),a=function(){function e(t,n,r,i,o,a){this.cardId=t,this.alerts=n,this.activeAlertIndex=r,this._position=i,this._initialAlertId=o,this._removedAlertsIds=a,this.activeAlert=e._getAlertByIndex(this.activeAlertIndex,this.alerts)}return e.createFromAlert=function(t){return e.create(t.id,[t],0)},e.create=function(t,n,r){var a=n.slice().sort(i.Alert.comparator),s=a[0];return o.invariant(!!s,"The card must contain at least 1 alert"),new e(t,a,e._getIndexByAlert(e._getAlertByIndex(r,n).id,a),s.highlightRange.end,s.id,new Set)},e._getIndexByAlert=function(e,t){var n=t.findIndex(function(t){return t.id===e});return o.invariant(-1!==n,"Alert must exist"),n},e._getAlertByIndex=function(e,t){var n=t[e];return o.invariant(!!n,"Active alert index should point to an alert"),n},Object.defineProperty(e.prototype,"activeAlertRemoved",{get:function(){return this._removedAlertsIds.has(this.activeAlert.id)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scheduledToDispose",{get:function(){return this.activeAlertRemoved&&1===this.alerts.length},enumerable:!0,configurable:!0}),e.prototype.compare=function(e){return this._position<e._position?-1:this._position>e._position?1:this._initialAlertId===e._initialAlertId?0:this._initialAlertId<e._initialAlertId?-1:1},e.prototype.add=function(t){var n=this.alerts.concat(t).sort(i.Alert.comparator);return new e(this.cardId,n,e._getIndexByAlert(this.activeAlert.id,n),this._position,this._initialAlertId,this._removedAlertsIds)},e.prototype.select=function(t){var n=this;o.invariant(!this._removedAlertsIds.has(t.id),"Cannot select removed alert");var r=this.alerts.filter(function(e){return!n._removedAlertsIds.has(e.id)});return new e(this.cardId,r,e._getIndexByAlert(t.id,r),this._position,this._initialAlertId,new Set)},e.prototype.remove=function(t){var n=this,r=new Set(t.map(function(e){return e.id})),i=new Set(this._removedAlertsIds),o=this.alerts.reduce(function(e,t,i){return r.has(t.id)&&t.id!==n.activeAlert.id?{remainingAlerts:e.remainingAlerts,activeAlertIndex:e.activeAlertIndex+(i<n.activeAlertIndex?-1:0)}:{remainingAlerts:e.remainingAlerts.concat([t]),activeAlertIndex:e.activeAlertIndex}},{remainingAlerts:[],activeAlertIndex:this.activeAlertIndex}),a=o.remainingAlerts,s=o.activeAlertIndex;return r.has(this.activeAlert.id)&&i.add(this.activeAlert.id),new e(this.cardId,a,s,this._position,this._initialAlertId,i)},e.prototype.nextAlert=function(){var e=this;return r.Option.of(this.alerts.slice(this.activeAlertIndex+1).find(function(t){return!e._removedAlertsIds.has(t.id)}))},e.prototype.prevAlert=function(){var e=this;return r.Option.of(this.alerts.slice(0,this.activeAlertIndex).reverse().find(function(t){return!e._removedAlertsIds.has(t.id)}))},e.prototype.hashCode=function(){var e=7;return e=31*e+r.hashCodeOfString(this.cardId),31*(e=31*e+r.hashCodeOfString(this.activeAlert.id))+this.alerts.length+this._removedAlertsIds.size},e.prototype.equals=function(e){return this.hashCode()===e.hashCode()&&o.ArrayUtils.equals(this.alerts,e.alerts)&&o.isSetsEq(this._removedAlertsIds,e._removedAlertsIds)},e}();t.Card=a,function(e){function t(e,t){return e.compare(t)}e.comparator=t}(a=t.Card||(t.Card={})),t.Card=a},1648:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(14),i=n(1465),o=n(1463),a=n(1464),s=n(3),l=function(){function e(e,t,n){this.meta=e,this.cardIndex=t,this.visibleCards=n,this.type=i.LensViewType.lensview,this.cardAppearance=i.CardAppearance.always,this.id=this.meta.id,s.invariant(t>-1,"card index shoud be positive number"),s.invariant(void 0!==this.card,"focused lens can not leave with undefined card")}return e.create=function(t,n,r){return new e(t,r,n.map(i.Card.createFromAlert))},Object.defineProperty(e.prototype,"card",{get:function(){return this.visibleCards[this.cardIndex]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeCardScheduledToDispose",{get:function(){return this.card.scheduledToDispose},enumerable:!0,configurable:!0}),e.prototype.add=function(t){var n=this,r=t.map(i.Card.createFromAlert),o=this.visibleCards.concat(r).sort(i.Card.comparator),a=o.findIndex(function(e){return n.card.cardId===e.cardId});return{currentLens:new e(this.meta,a,o),cardsToAdd:r}},e.prototype.remove=function(t){var n=new Set(t.map(function(e){return e.id})),r=this.visibleCards.map(function(e){return n.has(e.activeAlert.id)?e.remove([e.activeAlert]):e}),i=r.filter(function(e){return n.has(e.activeAlert.id)&&e.scheduledToDispose});return{currentLens:new e(this.meta,this.cardIndex,r),cardsToRemove:i}},e.prototype.dispose=function(t){var n=t.cardId,r=this.visibleCards.findIndex(function(e){return e.cardId===n}),i=this.visibleCards[r];return s.invariant(i.scheduledToDispose,"Unexpected dispose. Card does not ready to dispose."),s.invariant(n!==this.card.cardId&&r!==this.cardIndex,"Should not dispose focused alert"),new e(this.meta,this.cardIndex-(r<this.cardIndex?1:0),this.visibleCards.filter(function(e){return e.cardId!==n}))},e.prototype.select=function(t){var n=this.visibleCards.findIndex(function(e){return e.activeAlert.id===t.id});return new e(this.meta,n,this.visibleCards)},e.prototype.findNextAlert=function(){return s.ArrayUtils.lookAround(this.visibleCards,this.cardIndex,function(e){return!e.scheduledToDispose}).map(function(e){return e.value.activeAlert})},e.prototype.updateMeta=function(t){return new e(t,this.cardIndex,this.visibleCards)},e.prototype.equals=function(e){return this.id===e.id&&this.card.equals(e.card)&&this.meta.count===e.meta.count&&s.ArrayUtils.equals(this.visibleCards,e.visibleCards)},e}();t.FocusedLensViewImpl=l;var c=function(){function e(e,t){this.meta=e,this.visibleCards=t,this.cardAppearance=i.CardAppearance.always,this.type=i.LensViewType.advanced,this.id=this.meta.id,this.cardIndex=0,s.invariant(this.visibleCards.length>0,"AdvancedLensViewImpl should have at least one card")}return e.create=function(t,n){return new e(t,n.map(i.Card.createFromAlert))},Object.defineProperty(e.prototype,"card",{get:function(){return this.visibleCards[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeCardScheduledToDispose",{get:function(){return this.findNextAlert().isEmpty()},enumerable:!0,configurable:!0}),e.prototype.add=function(t){var n=t.map(i.Card.createFromAlert);return{currentLens:new e(this.meta,this.visibleCards.concat(n).sort(function(e,t){return o.Alert.comparator(e.activeAlert,t.activeAlert)})),cardsToAdd:[]}},e.prototype.remove=function(t){var n=new Set(t.map(function(e){return e.id})),r=this.visibleCards.map(function(e){return n.has(e.activeAlert.id)?e.remove([e.activeAlert]):e});return{currentLens:new e(this.meta,r),cardsToRemove:[]}},e.prototype.dispose=function(t){var n=t.cardId,r=this.visibleCards.find(function(e){return e.cardId===n});return s.invariant(void 0!==r,"Unexpected dispose. Unknown card or it is already disposed."),s.invariant(r.scheduledToDispose,"Unexpected dispose. Card does not ready to dispose."),new e(this.meta,this.visibleCards.filter(function(e){return e.cardId!==n}))},e.prototype.select=function(e){return this},e.prototype.findNextAlert=function(){return r.Option.of(this.visibleCards.find(function(e){return!e.scheduledToDispose})).map(function(e){return e.activeAlert})},e.prototype.equals=function(e){return this.id===e.id&&this.card.equals(e.card)&&this.meta.count===e.meta.count&&s.ArrayUtils.equals(this.visibleCards,e.visibleCards)},e}();t.PremiumLensViewImpl=c;var u=function(){function e(e,t,n,r){void 0===r&&(r=Array.from(t.values()).sort(i.Card.comparator)),this.meta=e,this._cardsHashMap=t,this.cardIndex=n,this.visibleCards=r,this.cardAppearance=i.CardAppearance.optional,this.type=i.LensViewType.plagiarism,this.id=this.meta.id}return e.create=function(t,n,i){var o=s.ImmutableMap.groupBy("cardId",n),a=s.ImmutableMap.patch(new Map,o,e._addAlertsToCard).newMap,l=new e(t,a,r.None);return r.Option.of(n[i]).map(function(e){return l.select(e)}).getOrElse(l)},Object.defineProperty(e.prototype,"activeCardScheduledToDispose",{get:function(){return this.card.exists(function(e){return e.scheduledToDispose})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"card",{get:function(){var e=this;return this.cardIndex.map(function(t){return e.visibleCards[t]})},enumerable:!0,configurable:!0}),e.prototype.add=function(t){var n=s.ImmutableMap.groupBy("cardId",t),r=s.ImmutableMap.patch(this._cardsHashMap,n,e._addAlertsToCard),o=r.newMap,a=r.addedItems,l=Array.from(o.values()).sort(i.Card.comparator);return{currentLens:new e(this.meta,o,this.card.map(function(e){var t=e.cardId;return l.findIndex(function(e){return e.cardId===t})}),l),cardsToAdd:a}},e.prototype.remove=function(t){var n=s.ImmutableMap.groupBy("cardId",t),r=s.ImmutableMap.patch(this._cardsHashMap,n,e._removeAlertsFromCard).newMap,o=Array.from(r.values()).sort(i.Card.comparator),a=o.filter(function(e){return e.scheduledToDispose});return{currentLens:new e(this.meta,r,this.cardIndex,o),cardsToRemove:a}},e.prototype.dispose=function(t){var n=t.cardId,r=this._cardsHashMap.get(n);s.invariant(void 0!==r,"Unexpected dispose. Unknown card or it is already disposed."),s.invariant(r.scheduledToDispose,"Unexpected dispose. Card does not ready to dispose.");var i=this.visibleCards.findIndex(function(e){return e.cardId===n});s.invariant(-1!==i,"Cannot dispose unknown alert");var o=s.ImmutableMap.remove(n,this._cardsHashMap);return new e(this.meta,o,this.cardIndex.filter(function(){return o.size>0}).map(function(e){return e-(i<e?1:0)}))},e.prototype.select=function(t){var n=this.visibleCards.findIndex(function(e){return e.cardId===t.cardId});s.invariant(-1!==n,"Cannot select unknown alert");var i=this.visibleCards[n].select(t),o=s.ImmutableMap.update(t.cardId,this._cardsHashMap,i);return new e(this.meta,o,r.Some(n))},e.prototype.findNextAlert=function(){var e=this;return s.invariant(this.card.nonEmpty()===this.cardIndex.nonEmpty(),"Lens is in wrong state"),r.Option.map2(this.card,this.cardIndex,function(t,n){return t.nextAlert().orElseL(function(){return t.prevAlert()}).orElseL(function(){return s.ArrayUtils.lookAround(e.visibleCards,n,function(e){return!e.scheduledToDispose}).map(function(e){return e.value.activeAlert})})}).flatMap(function(e){return e}).orElseL(function(){return r.Option.of(e.visibleCards.find(function(e){return!e.scheduledToDispose})).map(function(e){return e.activeAlert})})},e.prototype.equals=function(e){return this.id===e.id&&this.card.equals(e.card)&&this.meta.count===e.meta.count&&s.ArrayUtils.equals(this.visibleCards,e.visibleCards)},e._addAlertsToCard=function(e,t,n){return n.map(function(e){return e.add(t)}).orElseL(function(){return r.Some(i.Card.create(e,t,0))})},e._removeAlertsFromCard=function(e,t,n){return n.flatMap(function(e){var n=e.remove(t);return n.activeAlertRemoved?n.nextAlert().orElseL(function(){return n.prevAlert()}).map(function(e){return n.select(e)}).orElse(r.Some(n)):r.Some(n)})},e}();t.PlagiarismLensViewImpl=u;var d=function(){function e(e,t,n){this.meta=e,this.visibleCards=t,this.cardIndex=n,this.type=i.LensViewType.lensview,this.cardAppearance=i.CardAppearance.optional,this.id=this.meta.id}return e.create=function(t,n,r){return s.invariant(r.exists(function(e){return!!n[e]}),"Cannot find alert corresponding to the index"),new e(t,r.map(function(t){return i.Card.create(e.ID,n,t)}).fold(function(){return[]},function(e){return[e]}),r.map(function(){return 0}))},Object.defineProperty(e.prototype,"activeCardScheduledToDispose",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"card",{get:function(){var e=this;return this.cardIndex.map(function(t){return e.visibleCards[t]})},enumerable:!0,configurable:!0}),e.prototype.add=function(t){var n=this;return this.card.fold(function(){var o=[i.Card.create(e.ID,t,0)];return{currentLens:new e(n.meta,o,r.Some(0)),cardsToAdd:o}},function(r){return{currentLens:new e(n.meta,[r.add(t)],n.cardIndex),cardsToAdd:[]}})},e.prototype.remove=function(t){var n=this.card.get(),i=n.remove(t),o=i.scheduledToDispose?[i]:[];return{currentLens:new e(this.meta,[i],r.Some(0)),cardsToRemove:o}},e.prototype.dispose=function(){return s.invariant(this.card.exists(function(e){return e.scheduledToDispose}),"Unexpected dispose. Card was not removed or is already disposed."),new e(this.meta,[],r.None)},e.prototype.select=function(t){var n=this.card.get();s.invariant(n.alerts.some(function(e){return e.id===t.id}),"Cannot select unknown alert");var i=n.select(t);return new e(this.meta,[i],r.Some(0))},e.prototype.findNextAlert=function(){return this.card.flatMap(function(e){return e.nextAlert().orElseL(function(){return e.prevAlert()})})},e.prototype.updateMeta=function(t){return new e(t,this.visibleCards,this.cardIndex)},e.prototype.equals=function(e){return this.id===e.id&&this.card.equals(e.card)&&this.meta.count===e.meta.count},e.ID="readability-card",e}();t.ReadabilityLensViewImpl=d;var p=function(){function e(){this.cardAppearance=i.CardAppearance.never,this.type=i.LensViewType.proofit,this.meta=a.Lens.createEmptyLens({id:a.Lens.SpecialId.Proofit,title:"Proofit"}),this.id=a.Lens.SpecialId.Proofit,this.activeCardScheduledToDispose=!1}return e.create=function(){return e.value},e.prototype.add=function(){return{currentLens:this,cardsToAdd:[]}},e.prototype.remove=function(){return{currentLens:this,cardsToRemove:[]}},e.prototype.dispose=function(){return this},e.prototype.select=function(){return this},e.prototype.findNextAlert=function(){return r.None},e.prototype.equals=function(e){return this.id===e.id},e.value=new e,e}();t.ProofitLensViewImpl=p;var f=function(){function e(){this.cardAppearance=i.CardAppearance.never,this.type=i.LensViewType.success,this.meta=a.Lens.createEmptyLens({id:a.Lens.SpecialId.Success,title:"Success"}),this.id=this.meta.id,this.activeCardScheduledToDispose=!1}return e.create=function(){return e.value},e.prototype.add=function(){return{currentLens:this,cardsToAdd:[]}},e.prototype.remove=function(){return{currentLens:this,cardsToRemove:[]}},e.prototype.dispose=function(){return this},e.prototype.select=function(){return this},e.prototype.findNextAlert=function(){return r.None},e.prototype.equals=function(e){return this.id===e.id},e.value=new e,e}();t.SuccessLensViewImpl=f;var h=function(){function e(){this.cardAppearance=i.CardAppearance.never,this.type=i.LensViewType.closed,this.meta=a.Lens.createEmptyLens({id:a.Lens.SpecialId.Closed,title:"Closed"}),this.id=this.meta.id,this.activeCardScheduledToDispose=!1}return e.create=function(){return e.value},e.prototype.add=function(){return{currentLens:this,cardsToAdd:[]}},e.prototype.remove=function(){return{currentLens:this,cardsToRemove:[]}},e.prototype.dispose=function(){return this},e.prototype.select=function(){return this},e.prototype.findNextAlert=function(){return r.None},e.prototype.equals=function(e){return this.id===e.id},e.value=new e,e}();t.ClosedLensViewImpl=h},1649:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n(1463),o=function(){function e(e,t,n){var r=this;this._alertList=e,this._userId=t,this.docId=n,this.getAdvancedAlerts=function(){return r._alertList.getAllAlertsAsArray().filter(i.Alert.isPremium)}}return e.prototype.getAllAlertsLike=function(){return this._alertList.getAllAlertsAsArray().filter(function(e){return!i.Alert.isPlagiarism(e)}).map(function(e){return e.toAlertLike()})},e.prototype.openUpgradeUrl=function(e,t,n){n&&r.DesktopEditor.actions.openUpgradeUrl(e,t,this._userId.get())||(document.location.href=e)},e}();t.UpgradeViewModelImpl=o;!function(e){var t=function(){function e(){this.getAllAlertsLike=function(){return[]},this.getAdvancedAlerts=function(){return[]},this.docId="1"}return e.prototype.openUpgradeUrl=function(){},e}();e.Mock=t}(t.UpgradeViewModel||(t.UpgradeViewModel={}))},1650:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(23),a=n(7),s=n(1727),l=n(14),c=n(122),u=n(3),d=40,p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._linesCount=t.props.defaultLinesCount||d,t._wrapper=a.Atom.create(l.None),t._title=a.Atom.create(l.None),t._linesHeight=a.Atom.create(t._linesCount),t._subs=[],t}return r.__extends(t,e),t.prototype.componentDidMount=function(){var e=this;this._subs.push(o.Observable.combineLatest(this.context.screen.remSize,this.context.screen.resize.startWith(u.RxUtils.voidValue),function(e){return e}).switchMap(function(t){return a.Atom.combine(e._wrapper,e._title,function(e,n){return{wrapper:e,title:n,remSize:t}})}).filter(function(e){var t=e.wrapper,n=e.title;return t.nonEmpty()&&n.nonEmpty()}).switchMap(u.RxUtils.Scheduler.rafScheduler).switchMap(u.RxUtils.Scheduler.rafScheduler).subscribe(function(t){var n=t.wrapper,r=t.title,i=t.remSize,o=Math.floor((n.get().offsetHeight-r.get().offsetHeight)/i);e._linesHeight.set(o)}))},t.prototype.componentWillUnmount=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},t.prototype.render=function(){var e=this,t=this.props.wrapperClass;return i.createElement("div",r.__assign({ref:function(t){return e._wrapper.set(l.Option.of(t))}},a.classes(s.wrapper,t)),i.createElement("div",{className:s.loaderInitial}),i.createElement("div",{className:s.loader1}),i.createElement("div",{className:s.loader2}),i.createElement("div",{className:s.titleWrap,ref:function(t){return e._title.set(l.Option.of(t))}},this.props.children),i.createElement(a.F.div,r.__assign({style:this._linesHeight.view(function(e){return{height:e+"rem"}})},a.classes(s.lines,this.props.linesClass))),i.createElement("div",{className:s.empty}))},t}(c.BaseComponent);t.LinesLoader=p;var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.render=function(){return i.createElement(p,{linesClass:s.documentLines},i.createElement("div",{className:s.documentTitleWrap},i.createElement("div",{className:s.documentTitle})))},t}(c.BaseComponent);t.TextLoader=f;var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.render=function(){return i.createElement(p,{linesClass:s.lensviewLines,wrapperClass:s.lensviewWrapper},i.createElement("div",{className:s.lensviewTitle}),i.createElement("div",{className:s.lensviewDescr}),i.createElement("div",{className:s.lensviewOpenCard}))},t}(c.BaseComponent);t.LensviewLoader=h},1651:function(e,t,n){"use strict";function r(e,t){if(e.length<=4)return null;var n=i.textdiff(e,t),r=n.from,o=n.to,a=n.oldFragment,s=n.newFragment;if(void 0===s)return null;var l=1===s.length&&r>0&&e[r-1]===s,c=1===a.length&&0===s.length&&t[r-1]===a,u=r,d=s;return(l||c)&&(u=r-1),l&&(d=s+s),c&&(d=a),d.length>3?null:[e.substring(0,u),d,e.substring(o)]}Object.defineProperty(t,"__esModule",{value:!0});var i=n(208);!function(e){function t(e){return null!==e&&null!==e.match(/["'”][.,;]/)}function n(e){return null!==e&&e.replace(/\s/g,"").length<3&&null!==e.match(/[.,;:!?\\\/-]/)}function r(e){return null!==e&&null!==e.match(/,,/)}function i(e){return null!==e&&1===e.length&&/["'”’]/.test(e)}function o(e){return null!==e&&1===e.length&&null!==e.match(/[a-z]/i)}function a(e){return null!==e&&e.match(/[.,;:!?\\\/-]\s*[a-z]/i)}function s(e,s){return i(s)?e.deleteApostrophe:t(s)?e.deleteQuote:n(s)?e.deletePunctuation:r(s)?e.deleteDoubleComma:o(s)?e.deleteLetter:a(s)?e.deletePunctuationBeforeLetter:e.deleteAll}e.getClass=s}(t.Strike||(t.Strike={})),t.calcDiff=r},1652:function(e,t,n){"use strict";function r(e){return Array.from(e.attributes).map(function(e){return e.value})}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(1472),a=n(6);t.Inline=o.import("blots/inline");var s=function(e){function t(n){var i=e.call(this,n)||this;return i._unwrapMe=!1,i._unwrapMe=i.allowUnwrap(),i._unwrapMe&&t._logger.warn("Created self-unwrapped blot",r(i.domNode)),i}return i.__extends(t,e),Object.defineProperty(t,"_logger",{get:function(){return void 0===t.__logger&&(t.__logger=a.Monitoring.Logging.getLogger("DEd.custom_inline_blot")),t.__logger},enumerable:!0,configurable:!0}),t.prototype.allowUnwrap=function(){return Object.getPrototypeOf(this)===t.prototype&&"SPAN"===this.domNode.tagName},t.prototype.optimize=function(t){e.prototype.optimize.call(this,t),this._tryUnwrap("optimize")},t.prototype._unwrap=function(){var e=this,n=window.getSelection();if(n.isCollapsed&&n.anchorNode===this.domNode){var i=this.offset(this.parent)+this.length();this.unwrap(),requestAnimationFrame(function(){try{for(var o=0,a=e.parent.children.head;a&&o+a.length()<i;)o+=a.length(),a=a.next;var s=i-o;n.collapse(a.domNode,s)}catch(n){t._logger.error("Self-unwrapped blot: cannot preserve selection",r(e.domNode))}})}else n.anchorNode===this.domNode||n.focusNode===this.domNode?(t._logger.error("Self-unwrapped blot: unknown case",r(this.domNode)),this.unwrap()):this.unwrap()},t.prototype.formatAt=function(t,n,r,i){e.prototype.formatAt.call(this,t,n,r,i),this._tryUnwrap("formatAt")},t.prototype.update=function(t,n){e.prototype.update.call(this,t,n),this._tryUnwrap("update")},t.prototype._tryUnwrap=function(e){if(this._unwrapMe)try{this._unwrap(),t._logger.warn('Self-unwrapped blot unwrapped on "'+e+'"',r(this.domNode))}catch(n){t._logger.warn('Cannot unwrap on "'+e+'"',n)}finally{this._unwrapMe=!1}},t.__logger=void 0,t}(t.Inline);t.SelfUnwrappingInlineBlot=s,o.register("blots/inline",s,!0)},1653:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(23),o=n(1472),a=n(3),s=o.import("core/module"),l=o.import("delta"),c={bold:/<((b|strong)\b|[^>]*font-weight:\s?(bold|(\d{2,}|[6-9])\d\d))(.|\n)*?>/g,header:/<h[1-6]\b(.|\n)*?>/g,italic:/<(i\b|[^>]*font-style:\s?italic)(.|\n)*?>/g,underline:/<((u\b|[^>]*text-decoration:\s?underline)|style\b(.|\n)*text-decoration:\s?underline)(.|\n)*?>/g,list:/<((u|o)l\b)(.|\n)*?>/g},u=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.quill=t,r._options=n,r.textChangedAfterPaste=new i.Subject,r._replaceTabsWithSpaces=function(e){return e.replace(/\t/g,"    ")},r._fetchTagsAmount=function(e){return Object.entries(c).filter(function(t){t[0];return t[1].test(e)}).map(function(e){return e[0]})},r.syntheticPaste=function(e){r._options.flush(),r._onPaste(e)},r.onPaste=function(e){var t=r._replaceTabsWithSpaces(e.clipboardData.getData("text/plain")),n=r._fetchTagsAmount(e.clipboardData.getData("text/html"));r._onPaste(t,n),e.preventDefault()},r._onPaste=function(e,t){void 0===t&&(t=[]);var n=r.quill.getSelection()||{index:0,length:0};r.quill.getLength()-(n.index+n.length)+e.length>r._maxAllowedTextLength?r._lengthExceededCallback():r._flushHistory(function(){return r._doPaste(e,n,t)})},r._doPaste=function(e,t,n){var i=r.quill.getText(),a=i.length-1,s=i.trim().length,c=(new l).retain(t.index).delete(t.length),u=(new l).retain(t.index).insert(e);c.ops&&c.ops.length>0&&r.quill.updateContents(c,o.sources.USER),r._options.flush(),r.quill.updateContents(u,o.sources.USER),r._options.flush();var d=0===s?"initial":t.length===a?"reset":"partial";r.quill.setSelection("initial"===d||"reset"===d?0:t.index+e.length,0),r.quill.focus(),r.textChangedAfterPaste.next({type:d,len:e.length,tags:n})},r.onCopy=function(e){var t=r.quill.getSelection();t.length&&(r._copyRangeToClipboard(e,t),e.preventDefault())},r.onCut=function(e){r._flushHistory(function(){return r._onCut(e)}),e.preventDefault()},r._onCut=function(e){var t=r.quill.getSelection();if(t.length){r._copyRangeToClipboard(e,t);var n=(new l).retain(t.index).delete(t.length);r.quill.updateContents(n,o.sources.USER),r.quill.setSelection(t.index,0),r._options.flush()}},r._maxAllowedTextLength=n.maxAllowedTextLength||r.DEFAULTS.maxAllowedTextLength,r._lengthExceededCallback=n.lengthExceededCallback||r.DEFAULTS.lengthExceededCallback,r.quill.root.addEventListener("paste",r.onPaste),r.quill.root.addEventListener("copy",r.onCopy),r.quill.root.addEventListener("cut",r.onCut),r.container=r.quill.addContainer("ql-clipboard"),n.className&&r.container.classList.add(n.className),r.container.setAttribute("contenteditable","true"),r.container.setAttribute("tabindex","-1"),r}return r.__extends(t,e),t.prototype._copyRangeToClipboard=function(e,t){var n=this.quill.getText(t.index,t.length);e.clipboardData?e.clipboardData.setData("text/plain",n):void 0!==window.clipboardData&&window.clipboardData.setData("text",n)},t.prototype._flushHistory=function(e){this.quill.history.cutoff(),e(),this.quill.history.cutoff()},t.prototype.convert=function(){return(new l).insert("\n")},t.prototype.dangerouslyPasteHTML=function(){throw new Error("dangerouslyPasteHTML is not implemented")},t.DEFAULTS={maxAllowedTextLength:1e5,lengthExceededCallback:a.noop},t}(s);t.DenaliClipboard=u},1654:function(e,t,n){"use strict";function r(e){var t=e.ops[e.ops.length-1];return null!=t&&(null!=t.insert?"string"==typeof t.insert&&t.insert.endsWith("\n"):null!=t.attributes&&Object.keys(t.attributes).some(function(e){return null!=f.query(e,f.Scope.BLOCK)}))}function i(e){var t=e.reduce(function(e,t){return e+=t.delete||0},0),n=e.length()-t;return r(e)&&(n-=1),n}function o(e){if(e.ops&&e.ops.length){var t=e.reduce(function(e,t){return t.delete?e.delete(t.delete):t.insert?e.insert(t.insert,t.attributes&&a(t.attributes)):t.retain?e.retain(t.retain,t.attributes&&a(t.attributes)):e},new h);return t.ops&&1===t.ops.length&&t.ops[0].retain&&!t.ops[0].attributes?new h:t}return e}function a(e){return Object.keys(e).reduce(function(t,n){return g.test(n)?t:s.__assign({},t,(r={},r[n]=e[n],r));var r},{})}Object.defineProperty(t,"__esModule",{value:!0});var s=n(2),l=n(1472),c=n(3),u=n(1498),d=n(23),p=l.import("core/module"),f=l.import("parchment"),h=l.import("delta"),m=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.quill=t,r._options=n,r._lastRecorded=0,r._ignoreChange=!1,r._stack={undo:[],redo:[]},r._changed=new d.Subject,r.changed=r._changed,r.clear(),r.quill.on(l.events.EDITOR_CHANGE,function(e,t,i,a){e!==l.events.TEXT_CHANGE||r._ignoreChange||(n.userOnly&&a!==l.sources.USER?r._transform(o(t)):r._record(o(t),o(i)))}),r.quill.keyboard.addBinding({key:"Z",shortKey:!0},r.undo.bind(r)),r.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},r.redo.bind(r)),r.quill.keyboard.addBinding({key:"Y",shortKey:!0},r.redo.bind(r)),r}return s.__extends(t,e),t.prototype.clear=function(){this._stack={undo:[],redo:[]}},t.prototype.cutoff=function(){this._lastRecorded=0},t.prototype.redo=function(){this._change("redo","undo")},t.prototype.undo=function(){this._change("undo","redo")},t.prototype._flush=function(){this._options.flush&&this._options.flush()},t.prototype._change=function(e,t){if(this._flush(),0!==this._stack[e].length){var n=this._stack[e].pop();this._lastRecorded=0,this._ignoreChange=!0,this.quill.updateContents(n[e],l.sources.USER),this._ignoreChange=!1;var r=i(n[e]);this.quill.setSelection(r,0),this._stack[t].push(n),this._changed.next(c.RxUtils.voidValue)}},t.prototype._record=function(e,t){if(!e.ops||0!==e.ops.length){this._stack.redo=[];var n=o(this.quill.getContents()).diff(t),r=Date.now();if(this._lastRecorded+this._options.delay>r&&this._stack.undo.length>0){var i=this._stack.undo.pop();n=n.compose(i.undo),e=i.redo.compose(e)}else this._lastRecorded=r;this._stack.undo.push({redo:e,undo:n}),this._stack.undo.length>this._options.maxStack&&this._stack.undo.shift()}},t.prototype._transform=function(e){e.ops&&0===e.ops.length||(this._stack.undo.forEach(function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)}),this._stack.redo.forEach(function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)}))},t.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t}(p);t.DenaliHistory=m,t.getLastChangeIndex=i,t.filterMarkers=o;var g=new RegExp("^"+u.MarkerBlotName+"_")},1655:function(e,t,n){"use strict";function r(e){return{key:e[0].toUpperCase(),shortKey:!0,handler:a.noop}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(1472),a=n(3),s=o.import("modules/keyboard"),l=s.DEFAULTS.bindings,c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.DEFAULTS={bindings:{tab:l.tab,outdent:l.outdent,"outdent backspace":l["outdent backspace"],"remove tab":l["remove tab"],bold:r("bold"),italic:r("italic"),underline:r("underline")}},t}(s);t.DenaliKeyboard=c},1656:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(1472),o=n(23),a=n(14),s=n(1477),l=n(1525),c=n(1498),u=n(3),d=i.import("core/module"),p=i.import("blots/inline"),f=i.import("blots/text"),h=function(){function e(e,t,n,r){var i=this;this.id=e,this._getParentRect=t,this._getPosition=n,this._getNodeAt=r,this._isInline=function(e){return e instanceof p||e instanceof f},this._nextInline=function(e,t){var n="prev"===t?e.prev:e.next;return n&&i._isInline(n)?n:e.parent?i._nextInline(e.parent,t):null}}return e.prototype.fromEvent=function(e){var t=this._getNodes()[0],n=l.findMarkerUp(t);if(n)return o.Observable.fromEvent(n.domNode,e);throw new u.InvariantError("Cannot find dom element that corresponds to marker "+this.id)},Object.defineProperty(e.prototype,"range",{get:function(){return this._getPosition(this.id)},enumerable:!0,configurable:!0}),e.prototype._getInline=function(e){return e instanceof p?e:e.parent},Object.defineProperty(e.prototype,"rect",{get:function(){var e=this._getNodes(),t=this._getInline(e[0]).domNode,n=this._getInline(e[e.length-1]).domNode,r=this._getParentRect();return[u.DOM.absToRelative(t.getBoundingClientRect(),r),u.DOM.absToRelative(n.getBoundingClientRect(),r)]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstClientRect",{get:function(){var e=this._getNodes(),t=this._getInline(e[0]).domNode,n=this._getParentRect();return u.DOM.absToRelative(t.getClientRects()[0],n)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"viewportRect",{get:function(){var e=this._getNodes(),t=this._getInline(e[0]).domNode,n=this._getInline(e[e.length-1]).domNode;return[t.getBoundingClientRect(),n.getBoundingClientRect()]},enumerable:!0,configurable:!0}),e.prototype._getNodes=function(){var e=this.range,t=e.start,n=e.end,r=t,i=[],o=this._getNodeAt(t+1)[0];u.invariant(null!==o,"Blot should not be null at this point. Looks like we are trying to show/hide non-existing alert/underline "+this.id);do{i.push(o),r+=o.length(),o=this._nextInline(o,"next")}while(o&&r<n);return i},e}();t.MarkModel=h;var m=function(e){function t(t,n){var r=e.call(this,t,n)||this;r.quill=t,r.options=n,r._subs=[],r._marks=new Map,r.activeMarks=new o.BehaviorSubject(a.None),r.hoveredMarks=new o.BehaviorSubject(a.None),r.markChangeApplied=new o.Subject,r.changeMarks=function(e){if(0===e.length)return[];var t=r._getMarksModels(e);return r._preserveSelection(function(){return r.quill.updateContents(l.marksToDelta(e,r._getMarkAttributes),i.sources.API)}),e.forEach(function(e){return"remove"===e.action&&c.deregisterMark(e.id)}),r.markChangeApplied.next(e.map(function(e){return e.id})),t};var s=l.toQuillObservable(r.quill).share();return r._subs.push(s.filter(l.filterTextChange).filter(function(e){return e.source===i.sources.USER}).subscribe(function(e){var t=e.delta;r._unwrapMarkBreaks(t.ops)}),s.filter(l.filterSelectionChange).filter(function(e){var t=e.range;return t&&0===t.length}).map(function(e){var t=e.range;return e.source===i.sources.USER?a.Option.of(t).flatMap(function(e){var t=r.quill.getLeaf(e.index)[0],n=r.quill.getLeaf(e.index+1)[0];if(n!==t&&n){var i=r._getMarksByBlot(t).getOrElse([]),o=r._getMarksByBlot(n).getOrElse([]);return a.Option.of(i.concat(o)).filter(function(e){return e.length>0})}return r._getMarksByBlot(t)}):a.None}).subscribe(r.activeMarks),n.scrollContainer.map(function(e){return e.fold(function(){return r.quill.root},function(e){return e})}).switchMap(function(e){return o.Observable.combineLatest(o.Observable.merge(o.Observable.fromEvent(e,"mouseenter").mapTo(!0),o.Observable.fromEvent(e,"mouseleave").mapTo(!1)).distinctUntilChanged(),r.options.ongoingSelection).switchMap(function(e){var t=e[0];return e[1]?o.Observable.of(a.Option.empty()):t?o.Observable.merge(n.contentUpdated.mapTo(a.None),n.scrollPositionChanged.mapTo(a.None),o.Observable.fromEvent(r.quill.root,"mousemove",{passive:!0}).auditTime(50).map(function(e){var t=document.elementFromPoint(e.clientX,e.clientY);try{var n=i.find(t,!0);return!n||n instanceof i?a.Option.empty():r._getMarksByBlot(n)}catch(e){return a.Option.empty()}})):o.Observable.of(a.Option.empty()).delay(200)}).distinctUntilChanged(r._optionMarksEqual)}).subscribe(r.hoveredMarks)),r}return r.__extends(t,e),t.prototype._getMarksByBlot=function(e){var t=this;return a.Option.of(l.getMarksIdsByBlot(e)).map(function(e){return e.map(function(e){return t._marks.get(e)}).filter(Boolean)}).filter(u.notEmpty)},t.prototype.dispose=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},t.prototype._optionMarksEqual=function(e,t){return u.isOptionsEq(e,t,function(e,t){return e.length===t.length&&e.every(function(e,n){return t[n]===e})})},t.prototype._getMarksModels=function(e){var t=this;return e.map(function(e){switch(e.action){case s.Mark.ActionType.create:var n=new h(e.id,function(){return t.quill.container.getBoundingClientRect()},function(t){return e.range(t)},function(e){return t.quill.getLeaf(e)});return t._marks.set(n.id,n),c.registerMark(n.id),n;case s.Mark.ActionType.update:if(t._marks.has(e.id))return t._marks.get(e.id);throw new u.InvariantError("Cannot update unknown mark");case s.Mark.ActionType.remove:if(t._marks.has(e.id))return t._marks.delete(e.id),t._ensureActive(e.id),null;throw new u.InvariantError("Cannot remove unknown mark");default:return u.assertNever(e)}}).map(function(e){return null===e?null:0===e.range.length?null:e})},t.prototype._getMarkAttributes=function(e){var t=c.getBlotName(e.id);switch(e.action){case s.Mark.ActionType.create:return n={},n[t]={action:s.Mark.ActionType.create,id:e.id,classes:e.classes,order:e.order},n;case s.Mark.ActionType.update:return r={},r[t]={action:s.Mark.ActionType.update,id:e.id,classes:e.classes,order:e.order},r;case s.Mark.ActionType.remove:return i={},i[t]={action:s.Mark.ActionType.remove,id:e.id,removeType:e.removeType},i;default:return u.assertNever(e)}var n,r,i},t.prototype._preserveSelection=function(e){var t=this.quill.getSelection();e(),t&&t.length>0&&(this.quill.setSelection(t.index,0,i.sources.API),this.quill.setSelection(t.index,t.length,i.sources.API))},t.prototype._ensureActive=function(e){var t=this;this.activeMarks.getValue().filter(function(t){return t.some(function(t){return t.id===e})}).map(function(){t.activeMarks.next(a.None)}),this.hoveredMarks.getValue().filter(function(t){return t.some(function(t){return t.id===e})}).map(function(){return t.hoveredMarks.next(a.None)})},Object.defineProperty(t.prototype,"_rootBlot",{get:function(){return this._rootBlotCached||(this._rootBlotCached=i.find(this.quill.scroll)),this._rootBlotCached},enumerable:!0,configurable:!0}),t.prototype._findInsertsToUnwrap=function(e,t,n){var r=this,i=[],o=this.quill.getLeaf(e+1)[0];return l.findCornerBlotsUp(o,n).forEach(function(o){var a=o.offset(r._rootBlot),l=a+o.length();("prefix"===n?a===e:l===t)&&i.push(s.Mark.getRemoveAction({range:function(){return new s.Range(e,t)},id:o.markId},s.Mark.RemoveType.partial))}),i},t.prototype._unwrapMarkBreaks=function(e){var t=this,n=e.reduce(function(e,n){var r=e.start,i=e.toRemove;return l.isMarkChangeOperation(n)&&(l.isBreakWordInsert(n,"prefix")&&i.push.apply(i,t._findInsertsToUnwrap(r,r+n.insert.length,"prefix")),l.isBreakWordInsert(n,"suffix")&&i.push.apply(i,t._findInsertsToUnwrap(r,r+n.insert.length,"suffix"))),{start:r+l.changeDiff(n),toRemove:i}},{start:0,toRemove:[]}).toRemove;n.length&&this.quill.updateContents(l.marksToDelta(n,this._getMarkAttributes),i.sources.API)},t.DEFAULTS={},t}(d);t.MarksManager=m},1657:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(1472),o=n(3),a=i.import("core/theme"),s=function(e){function t(t,n){var r=e.call(this,t,n)||this;if(t.root.setAttribute("spellcheck","false"),n.classes){var i=n.classes;t.root.className=o.DOM.classes(i.editor,t.root.className),t.container.className=o.DOM.classes(t.container.className,i.editorContainer)}return r}return r.__extends(t,e),t}(a);t.DenaliTheme=s},1658:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.printClassName,a=e.containerClassName,s=e.title,l=e.onMount;return i.createElement("div",{className:a},i.createElement(o.F.input,r.__assign({type:"text",placeholder:"Type your title",maxLength:5e3,"data-name":"title-input",key:"title-input",spellCheck:!1,className:t,mount:l},o.bind({value:s}))),n&&i.createElement(o.F.div,{className:n},s))},t}(i.Component),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.componentDidMount=function(){this.props.onMount&&this.props.onMount(this._editorWrapEl)},t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.render=function(){var e=this,t=this.props,n=t.theme,r=void 0===n?{}:n,o=t.children;return i.createElement("div",{className:r.editorContentWrap},i.createElement("div",{className:r.editorContent,ref:function(t){return t&&(e._editorWrapEl=t)}},o))},t}(i.Component);t.DedWrapper=s;var l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onMount=function(e){var n=e.parentNode.parentNode;t.props.denaliEditor.attach(e,n,t._titleEl,t.props.viewportPadding)},t}return r.__extends(t,e),t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.componentWillUnmount=function(){this.props.denaliEditor.dispose()},t.prototype.render=function(){var e=this,t=this.props,n=t.theme,r=void 0===n?{}:n,l=t.title,c=t.children;return i.createElement(s,{theme:r,onMount:this._onMount},i.createElement(a,{className:r.title,printClassName:r.printTitle,containerClassName:r.titleWrap,onMount:function(t){return t&&(e._titleEl=t)},title:l}),i.createElement(o.F.div,null,c))},t}(i.Component);t.DedComponent=l},1674:function(e,t){e.exports={clearfix:"_de91e2-clearfix",dropZoneElement:"_de91e2-dropZoneElement",active:"_de91e2-active",dropzone:"_de91e2-dropzone",progressContainer:"_de91e2-progressContainer",message:"_de91e2-message",dropzoneMiddleblock:"_de91e2-dropzoneMiddleblock",hovered:"_de91e2-hovered"}},1687:function(e,t){e.exports={wrapper:"_0a2856a7-proofit-wrapper",proofitWrapper:"_5abade03-proofit-proofitWrapper",proofitDetailsWrapper:"_28465730-proofit-proofitDetailsWrapper",plansContainer:"_43c6f132-proofit-plansContainer",planTitle:"_244c1c4d-proofit-planTitle",price:"_118b3180-proofit-price",mostPopular:"_d3308475-proofit-mostPopular",planWrapper:"_a97573f5-proofit-planWrapper",planWrapperActive:"_a4258e1c-proofit-planWrapperActive _a97573f5-proofit-planWrapper",planWrapperDisabled:"_b3db8c03-proofit-planWrapperDisabled _a97573f5-proofit-planWrapper",plans:"_f5683d44-proofit-plans",planContainer:"_bd1c5b4b-proofit-planContainer",button:"_5253e156-proofit-button",paymentWarning:"_58123434-proofit-paymentWarning",fadeIn:"_d942aef3-proofit-fadeIn",loader:"_cfcbfed8-proofit-loader",iconContainer:"_12b32125-proofit-iconContainer",jetIcon:"_34b9acc0-proofit-jetIcon",rocketIcon:"_6649cfbb-proofit-rocketIcon",planLoading:"_7a498fec-proofit-planLoading",orderButton:"_4a3ca41f-proofit-orderButton _5253e156-proofit-button",descriptionDisabled:"_83c9f8fd-proofit-descriptionDisabled"}},1688:function(e,t){e.exports={successLens:"_741af8f4-success_lens-successLens",successContainer:"_76e2808c-success_lens-successContainer",successIcon:"_821fcb71-success_lens-successIcon",successTitle:"_12bdcf41-success_lens-successTitle",successContent:"_204b92e6-success_lens-successContent",animationWrapper:"_1baff2f2-success_lens-animationWrapper",textWrapper:"_660094fb-success_lens-textWrapper",fadeOutStart:"_e51bfd48-success_lens-fadeOutStart",fadeOutEnd:"_1fe47883-success_lens-fadeOutEnd _e51bfd48-success_lens-fadeOutStart",fadeInStart:"_c0597604-success_lens-fadeInStart",fadeInEnd:"_839a04ec-success_lens-fadeInEnd _c0597604-success_lens-fadeInStart",visible:"_a74c9355-success_lens-visible",transitionDelay:"_fa87dcb6-success_lens-transitionDelay"}},1689:function(e,t){e.exports={infoButton:"_1a4e38a4-stats-infoButton",infoIcon:"_21d2fd17-stats-infoIcon",wrapper:"_57192845-stats-wrapper",statisticsWrapper:"_d0017550-stats-statisticsWrapper",blockWrapper:"_62bd17a0-stats-blockWrapper",headerBlock:"_23b27535-stats-headerBlock",bodyBlock:"_68fa4340-stats-bodyBlock",sectionHeaderFont:"_54326cfc-stats-sectionHeaderFont",sectionHeaderUnderline:"_418f4725-stats-sectionHeaderUnderline",sectionHeaderWrapper:"_3f20a55c-stats-sectionHeaderWrapper _418f4725-stats-sectionHeaderUnderline",modalHeader:"_4fafcb89-stats-modalHeader",row:"_18d9754b-stats-row",halfRow:"_7afe3df5-stats-halfRow _18d9754b-stats-row",number:"_706a39d4-stats-number",time:"_a42ae385-stats-time",numberTitle:"_4661ab06-stats-numberTitle",timeTitle:"_92763578-stats-timeTitle",numberTitleWrapper:"_7483ae81-stats-numberTitleWrapper",progress:"_8401b7de-stats-progress",progressLabel:"_03031159-stats-progressLabel",progressStatistics:"_1c17536b-stats-progressStatistics",readabilityDescr:"_93797973-stats-readabilityDescr",loaderHolder:"_448f72c9-stats-loaderHolder",loaderHeader:"_3402f79e-stats-loaderHeader",loader:"_c8e3c6a7-stats-loader",emptyBodySvgPath:"_41d794a8-stats-emptyBodySvgPath",emptyBodyContainer:"_d25324e3-stats-emptyBodyContainer",emptyBodyText:"_34ba5413-stats-emptyBodyText",descriptionTooltip:"_1f054130-stats-descriptionTooltip",downloadPdfReportButton:"_ebc4eb7a-stats-downloadPdfReportButton",preparingForReportLabel:"_f796d300-stats-preparingForReportLabel",downloadPdfSpinner:"_c8bae786-stats-downloadPdfSpinner",loaderContainer:"_618ed19b-stats-loaderContainer",downloadIcon:"_b32c896e-stats-downloadIcon"}},1690:function(e,t,n){e.exports=n.p+"files/6a838499830b0c29490541ffdb6154b7/bg.jpg"},1691:function(e,t,n){"use strict";function r(e){switch(e.type){case"alertUndoDenali":return o.createElement(p.Notification.Undo,{action:e.undoHandler,content:m.getUndoNotificationContent(e.args),classes:{button:v.alertUndoBtn,icon:v.alertUndoIcon,content:v.alertUndoContent,wrapper:v.alertUndoWrapper}});case"error":return o.createElement(p.Notification.Error,i.__assign({},{theme:_}));case"unauthorizedError":return o.createElement(p.Notification.UnauthorizedError,i.__assign({},{theme:_}));case"offline":var t=e.args.reconnectTime;return o.createElement(p.Notification.Offline,i.__assign({},{reconnect:u.noop,reconnectTime:t,theme:_}));case"unknownConnectionError":case"serverError":return o.createElement(p.Notification.ServerError,i.__assign({},{theme:_}));case"connectionWSError":return o.createElement(p.Notification.ConnectionWSError,i.__assign({},{theme:_}));case"clientConnectionError":return o.createElement(p.Notification.ClientConnectionError,i.__assign({},{theme:_}));case"slowNetwork":return o.createElement(p.Notification.SlowNetworkError,i.__assign({},{theme:_}));case"checkingIsDown":return o.createElement(p.Notification.CheckingIsDownError,i.__assign({},{theme:_}));case"copyToClipboardFailed":return o.createElement(p.Notification.CopyToClipboardError,i.__assign({},{theme:_}));case"proofitPaymentDeclinedError":var n=e.args,r=n.paymentMethod,a=n.creditCardSuffix;return o.createElement(p.Notification.ProofitPaymentDeclinedError,i.__assign({},{errorMessage:g.getPaymentErrorText(r,a),theme:_}));case"proofitEmptyDocumentError":return o.createElement(p.Notification.ProofitEmptyDocumentError,i.__assign({},{theme:_}));case"proofitDocumentProofreadError":return o.createElement(p.Notification.ProofitDocumentProofreadError,i.__assign({},{theme:_},{navigateToDocuments:e.args.navigateToDocuments}));case"proofitCancelled":return o.createElement(p.Notification.ProofitCancelled,i.__assign({},{theme:_}));case"proofitCompleted":var l=e.args,c=l.email,d=l.documentTitle,h=l.documentDownloadUrl;return o.createElement(p.Notification.ProofitCompleted,i.__assign({},{theme:_,documentTitle:d,documentDownloadUrl:h,email:c}));case"alertsNothingFound":return o.createElement(p.Notification.AlertsNothingFound,null);case"generic":var b=e.args,y=b.message,w=b.description;return o.createElement(p.Notification,i.__assign({},{title:y,children:w,theme:_}));case"documentUploaded":return o.createElement(f.DocumentUploadedNotification,{navigateToDocument:e.args.navigateToDocument,linkClassName:v.link});case"denaliDocumentUploaded":return o.createElement(p.Notification.DenaliDocumentUploadedNotification,{theme:_,navigateToDocuments:e.args.navigateToDocuments});case"documentSizeExceeded":return o.createElement(f.DocumentSizeExceededNotification,{headerClassName:v.header});case"documentTypeUnsupported":return o.createElement(f.DocumentTypeUnsupportedNotification,null);case"trackedChangesIsUnsupported":return o.createElement(f.DocumentWithTrackedChangesIsUnsupported,{linkClassName:v.link});case"documentIsEmpty":return o.createElement(f.DocumentIsEmptyNotification,null);case"documentUploadGeneralError":return o.createElement(f.DocumentUploadErrorGeneralNotification,null);case"isTemporaryDownloadError":return o.createElement(f.IsTemporaryDownloadErrorNotification,null);case"downloadDocumentNotFoundError":return o.createElement(f.DownloadDocumentNotFoundNotification,null);case"documentNotFoundError":return o.createElement(p.Notification.DocumentNotFoundError,i.__assign({navigateToDocuments:e.args.navigateToDocuments},{theme:_}));case"blobDownloadUnsupported":return o.createElement(p.Notification.BlobDownloadUnsupportedNotification,i.__assign({},{theme:_}));case"selfUpdateBlocker":return o.createElement(p.Notification.SelfUpdateNotification,i.__assign({},{theme:_}));default:return s.Monitoring.Logging.getLogger("denali.notifications").error("Unrecognized notification type "+e.type),o.createElement(p.Notification.Error,i.__assign({},{theme:_}))}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(13),a=n(7),s=n(6),l=n(122),c=n(573),u=n(3),d=n(1461),p=n(1789),f=n(1502),h=n(1481),m=n(1787),g=n(1790),v=n(1556),_={header:v.header,link:v.link};t.defaultDenaliRenderNotification=r;var b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype._getNotificationClass=function(){var e=this.props.notification.size;switch(e){case"flexible":return v.flexibleNotification;case void 0:return v.fixedNotification;default:return u.assertNever(e)}},t.prototype._isClosable=function(){var e=this.props.notification;return!e.important&&!e.dontCloseOnClick||e.denaliCloseOnClick},t.prototype._getNotificationIcon=function(){var e=this.props.notification.severity,t="flexible"===this.props.notification.size;switch(e){case void 0:case"warn":return o.createElement(c.Icon.NotificationWarning,{className:t?v.alertIconMini:v.alertIcon});case"info":return o.createElement(c.Icon.NotificationInfo,{className:t?v.alertIconMini:v.alertIcon});case"error":return o.createElement(c.Icon.NotificationError,{className:t?v.alertIconMini:v.alertIcon});default:return u.assertNever(e)}},t.prototype.render=function(){var e=this.props,t=e.notification,n=e.hide,r=e.render,s="flexible"===t.size;return o.createElement("div",null,o.createElement("div",i.__assign({key:t.id},a.classes(v.notification,this._getNotificationClass())),o.createElement("div",{className:s?v.miniContentWrapper:v.contentWrapper,key:t.id},this._getNotificationIcon(),o.createElement("span",{className:s?v.miniContent:v.content},r(t)),this._isClosable()&&o.createElement(d.Button,{name:"closeNotification",className:s?v.closeIconWrapperMini:v.closeIconWrapper,onClick:function(){return n(t.id)}},o.createElement(c.Icon.Close,{className:v.closeIcon,width:12})))))},t}(o.Component);t.NotificationView=b;var y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._subscriptions=[],t._renderNotification=function(e){return r(e)},t._hide=function(e){t.props.notifications.hide(e)},t._bottom=t.props.wootricViewModel.map(function(e){return t.props.notifications.items.switchMap(function(t){if(0===t.length)return a.Atom.create({});var n=t[0].severity;return void 0===n||"info"===n||"warn"===n?e.height.view(function(e){return e>0?{bottom:e+"px"}:{}}):a.Atom.create({})})}).getOrElse(void 0),t}return i.__extends(t,e),t.prototype.componentDidMount=function(){this._subscriptions.push(this.props.denaliEditorModel.dontFreezeWhen(this.props.notifications.items.view(function(e){return e.some(function(e){return"error"===e.severity})}),"notificationCenter"))},t.prototype.componentWillUnmount=function(){this._subscriptions.forEach(function(e){return e.unsubscribe()}),this._subscriptions=[]},t.prototype._getNotificationClass=function(e){var t=e.severity;switch(t){case void 0:case"info":case"warn":return v.bottomNotification;case"error":return a.classes(v.topNotification,v.overContent).className;default:return u.assertNever(t)}},t.prototype.render=function(){var e=this;return o.createElement(a.F.div,i.__assign({},a.classes(v.notificationWrapper,this.props.notifications.items.map(function(t){return t.length>0?e._getNotificationClass(t[0]):""})),{style:this._bottom}),this.props.notifications.items.map(function(t){return t.map(function(t){var n=o.createElement(b,{key:t.id,notification:t,hide:e._hide,render:e._renderNotification});return"error"===t.severity?o.createElement(h.Overlay,{key:t.id,preventClose:!0,overlayType:"light",alignment:"top-center",animate:!0,theme:{content:v.overlayContent,contentFaded:v.overlayContentFaded}},n):n})}))},t}(l.BaseComponent);t.DenaliNotificationCenter=y},1692:function(e,t,n){"use strict";function r(e){var t=e.value,n=e.className,r=e.progressClass,c=s.Atom.create(!1);requestAnimationFrame(function(){return requestAnimationFrame(function(){return c.set(!0)})});var d=a.Observable.combineLatest(l.toObservable(t),c,function(e,t){return t?e+"%":0});return o.createElement(s.F.div,i.__assign({},s.classes(u.wrapper,n)),o.createElement(s.F.div,i.__assign({},s.classes(u.progress,r),{style:{width:d}})))}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(13),a=n(23),s=n(7),l=n(315),c=n(1467),u=n(1720);t.Progress=r,function(e){e.Label=function(e){var t=e.value,n=e.className,r=t>66?"Good":t>50?"Average":"Below average";return o.createElement(c.Small,{className:n},r)}}(r=t.Progress||(t.Progress={}))},1693:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(7),o=n(1463),a=n(1464),s=n(3),l=n(1513),c=function(){function e(){}return e.get=function(e){return{create:function(t){return new u(e,t)}}},e}();t.LensManagerFactory=c;var u=function(){function e(e,t){this._counters=e,this._ops=t,this.lenses=i.Atom.create({}),this._addLensMeta=function(e,t){return function(n){return n.map(function(t){return t.appendMeta(e)}).getOrElseL(t)}},this._subtractLensMeta=function(e){return function(t){return t.map(function(t){return t.appendMeta(a.Lens.Meta.reverse(e))}).filter(function(e){return e.count>0})}}}return e.prototype.addAlerts=function(e){var t=this,n=l.DocumentCounters.empty;this.lenses.modify(function(i){var o=e.reduce(function(e,r){n=l.DocumentCounters.join(n,r.counters);var i=a.Lens.Meta.fromAlert(r.counters);return s.ObjectUtils.immutableUpdate(e,r.lensId,t._addLensMeta(i,function(){return t._createLensImpl(r)}))},i),c=r.__assign({},a.Lens.Meta.empty,{count:e.filter(function(e){return e.belongsToAllAlerts}).length,unreadCount:0});return s.ObjectUtils.immutableUpdate(o,a.Lens.SpecialId.AllIssues,t._addLensMeta(c,function(){return a.Lens.createEmptyAllIssuesLens(c)}))}),this._counters.modify(function(e){var t=l.DocumentCounters.join(e,n);return s.invariant(l.DocumentCounters.isValid(t),"counters, after add, can not be below zero"),t})},e.prototype.removeAlerts=function(e){var t=this,n=l.DocumentCounters.empty;this.lenses.modify(function(i){var o=e.reduce(function(e,r){n=l.DocumentCounters.join(n,r.counters);var i=a.Lens.Meta.fromAlert(r.counters);return s.ObjectUtils.immutableUpdateOption(e,r.lensId,t._subtractLensMeta(i))},i),c=r.__assign({},a.Lens.Meta.empty,{count:e.filter(function(e){return e.belongsToAllAlerts}).length,unreadCount:n.unread});return s.ObjectUtils.immutableUpdateOption(o,a.Lens.SpecialId.AllIssues,t._subtractLensMeta(c))}),this._counters.modify(function(e){var t=l.DocumentCounters.join(e,l.DocumentCounters.reverse(n));return s.invariant(l.DocumentCounters.isValid(t),"counters, after subtract, can not be below zero"),t})},e.prototype.readAlerts=function(e){this.lenses.modify(s.ObjectUtils.immutableModifyOption(e.lensId,this._readAlerts)),e.isRead||this._counters.lens("unread").modify(function(e){return e-1})},e.prototype.toString=function(){return JSON.stringify(this,void 0,2)},e.prototype.toJSON=function(){return this.lenses.get()},e.prototype._createLensImpl=function(e){return new a.Lens.LensImpl(o.Alert.toLens(e),a.Lens.Meta.fromAlert(e.counters),this._ops)},e.prototype._readAlerts=function(e){return e.map(function(e){return e.appendMeta(s.ObjectUtils.update(a.Lens.Meta.empty,{unreadCount:e.unreadCount>0?e.unreadCount-1:0}))})},e}();t.LensManager=u},1694:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),i=n(23),o=n(31),a=n(14),s=n(575),l=n(3),c=n(1463),u=n(1480),d=n(157),p=function(){function e(e,t,n){var p=this;this._positionManager=e,this._capiClient=t,this._log=r.Monitoring.Logging.getLogger("AlertManager",r.Logging.LogLevel.DEBUG),this._addAlerts=new o.Subject,this._removeAlerts=new o.Subject,this._flush=new o.Subject,this._alertsPerRevision=0,this._queue={},this._queuedAlerts={},this._appliedAlerts=new Map,this._allAlerts={},this._capiAlertsIdMapping={},this.alertEvents=new o.Subject,this.changes=new o.Subject,this._onCapiEvent=function(e){try{switch("alert_received"===e.kind&&p._alertsPerRevision++,e.kind){case"alert_received":case"plagiarism_alert_received":if(!1===e.alert.hidden&&void 0===e.alert.cardLayout)return void p._log.warn("got alert with empty mapping",{pname:e.alert.pname});p._addAlert(c.Alert.create(e.alert,p,p._positionManager));break;case"alert_removed":p._removeAlert(a.Left(e.alertId));break;case"finish":p._log.trace("Alerts per revision (#"+e.revision+"): "+p._alertsPerRevision),p._alertsPerRevision=0;break;case"finish":case"async_check_finished":p.flushAlerts()}}catch(t){p._log.warn("Cannot handle alert event "+e.kind,t)}},this._validateAlert=function(e){try{var t=!c.Alert.isPremium(e)||void 0!==e.categoryHuman;return t||(p._log.error("Alert without categoryHuman",e),e.dispose()),t}catch(t){p._log.error("Cannot validate alert",t);try{e.dispose()}catch(e){p._log.warn("Cannot dispose invalid alert",e)}return!1}},this._hideAlert=function(e){p._log.debug("_hideAlert(#"+e);var t=p._appliedAlerts.get(e),n=t.undoable,r=t.source;l.invariant(void 0!==n,"Undoable should be registered for alert "+e),p._appliedAlerts.delete(e),p._removeAlertsUnbuffered([e],r,n)},this._dismissAll=function(e){var t=p.getAllAlertsAsArray().filter(function(t){return t.lensId===e.id}),n=function(){p._capiClient.capi.dismissAll(e.category+"/"+e.id)};return p._dismissBatch(t,s.FeedbackType.DISMISS_BY_LENS,n)},this._dismissBatch=function(e,t,n){void 0===t&&(t=s.FeedbackType.IGNORE),p.flushChanges();var r=e.map(function(e){return e.copy().invalidate()}),i={action:t,commit:function(){r.forEach(function(e){return e.dispose()}),n?n():e.forEach(function(e){return p._commitToCapi(e._raw,t)})},undo:function(){return p._addAlertsUnbuffered(r),r}},o=e.map(function(e){return e.id});return o.filter(function(e){return void 0!==p._queue[e]}).forEach(function(e){return p._queue[e].forEach(function(e){return p._removeQueuedAlert(e)})}),p._removeAlertsUnbuffered(o,c.AlertActionSource.sidebar,i),i},this._applyAlert=function(e,t,n){p._log.debug("_applyAlert(#"+e.id+", rrange: "+e.replaceRange+")"),p.flushChanges(),e.registerAppliedRange();var r=e.replaceRange,i=r.start,o=r.end-r.start,a=p._positionManager.getTextLength(),l=e.copy().invalidate().deregisterRanges(),c=!1,u={action:s.FeedbackType.ACCEPTED,replacement:t,commit:function(){c||(p._log.debug("_applyAlert(#"+e.id+"):commit()"),p._removeQueuedAlert(e.id))},undo:function(){c=!0,p._log.debug("_applyAlert(#"+e.id+"):undo()");var n=p._positionManager.getTextLength();n!==a&&p._log.error("Text has changed while uncommitted apply is present. Expected: "+a+", actual: "+n);var r=d.Change.delta((new d.Delta).retain(i).delete(t.length).insert(e.replaceText),n);return p.changes.next(r),p.flushChanges(),l.registerRanges(),p._addAlertsUnbuffered([l]),[l]}};return p._appliedAlerts.set(e.id,{undoable:u,source:n}),p._capiClient.capi.accept(e._raw.id,e._raw.begin,t),o>0&&p.changes.next(d.Change.del(i,o,a)),p.changes.next(d.Change.ins(i,t,a-o)),a=p._positionManager.getTextLength(),p.alertEvents.next({kind:"alert_applied",alert:e}),u},this._alertFeedback=function(e,t,n){if(p._log.debug("_alertFeedback(#"+e.id+", feedbackType: "+t+", source: "+n+")"),t!==s.FeedbackType.LOOKED||e.isRead||(p._lensManager.readAlerts(e),e.isRead=!0),t===s.FeedbackType.IGNORE||t===s.FeedbackType.OFFENSIVE_CONTENT||t===s.FeedbackType.WRONG_SUGGESTION||t===s.FeedbackType.ADD_TO_DICTIONARY||t===s.FeedbackType.LIKE||t===s.FeedbackType.DISLIKE){p.flushChanges();var r=e.copy().invalidate(),i={action:t,replacement:e.replaceText,commit:function(){r.dispose(),p._commitToCapi(e._raw,t)},undo:function(){return p._addAlertsUnbuffered([r]),[r]}};return p._removeAlertsUnbuffered([e.id],n,i),i}return p._commitToCapi(e._raw,t),{action:t,commit:l.noop,undo:function(){return[]}}},this._onRangeChanged=function(e){var t=e.filter(u.RangeWithId.hasAlertId).filter(function(e){return(e.type===c.Alert.RangeType.HIGHLIGHT||e.type===c.Alert.RangeType.HIGHLIGHT_IGNORE&&0===e.length)&&!p._appliedAlerts.has(e.alertId)}).map(function(e){return e.alertId});t.length>0&&(p._log.debug("Range[s] changed "+t),t.forEach(function(e){return p._removeAlert(a.Right(e))}),p.flushAlerts())},this._lensManager=n.create(this),this.lenses=this._lensManager.lenses,t.events.filter(function(e){return"before_finish"===e.kind}).subscribe(function(){return p.flushAlerts()}),t.events.filter(function(e){return"session_started"===e.kind}).do(function(){return p._invalidateAlerts()}).switchMap(function(){return i.Observable.merge(t.events.filter(function(e){return"finish"===e.kind}).first().mapTo("alert"),t.events.filter(function(e){return"async_check_finished"===e.kind}).first().mapTo("plagiarism"))}).subscribe(function(e){return p._removeInvalidAlerts(e)}),t.events.subscribe(this._onCapiEvent),e.rangeChanged.subscribe(this._onRangeChanged);var f=i.Observable.interval(250).startWith(0).merge(this._flush);this._addAlerts.merge(this._removeAlerts).buffer(f).filter(function(e){return e.length>0}).subscribe(function(e){return p._addRemoveAlertsBatch(e)}),l.registerDebugHelper("alerts",function(){return p.toString()})}return e.prototype.flushAlerts=function(){this._flush.next()},e.prototype.flushChanges=function(){this.changes.next(d.Change.flush())},e.prototype.getAllAlerts=function(){return this._allAlerts},e.prototype.getAllAlertsAsArray=function(){return l.ObjectUtils.toArray(this._allAlerts)},e.prototype.getAllAlertsAsSortedArray=function(e){var t=this.getAllAlertsAsArray();return(e?t.filter(e):t).sort(c.Alert.comparator)},e.prototype._invalidateAlerts=function(){this._log.debug("Invalidate alerts..."),this.flushAlerts(),this.getAllAlertsAsArray().forEach(function(e){return e.invalidate()})},e.prototype._getTypeFilter=function(e){switch(e){case"alert":return function(e){return!c.Alert.isPlagiarism(e)};case"plagiarism":return function(e){return c.Alert.isPlagiarism(e)};default:return l.assertNever(e)}},e.prototype._removeInvalidAlerts=function(e){var t=this;this._log.debug("Removing invalid alerts by type '"+e+"'..."),this.flushAlerts();var n=this._getTypeFilter(e),i=this.getAllAlertsAsArray().filter(function(e){return!e.isValid&&!t._appliedAlerts.has(e.id)&&n(e)});i.forEach(function(e){return t._removeAlert(a.Right(e.id))}),this._log.debug(i.length+" alerts removed"),this._log.isEnabled(r.Logging.LogLevel.TRACE)&&this._log.trace("Removed alerts",i)},e.prototype._tryToMatchDuplicate=function(e,t){var n=this;return a.Option.of(t.find(function(t){return!t.isValid&&t.isDuplicate(e)})).fold(function(){return n._capiAlertsIdMapping[e._raw.id]=e.id,!1},function(t){return n._log.debug("Merged alert "+e.id+" into "+t.id),delete n._capiAlertsIdMapping[t._raw.id],t.updateRawAlert(e._raw),n._capiAlertsIdMapping[e._raw.id]=t.id,e.dispose(),!0})},e.prototype._addAlert=function(e){this._log.trace("_addAlert(#"+e.id+")"),this._addAlerts.next(e)},e.prototype._addAlertsUnbuffered=function(e){var t=this;this._log.debug("_addAlertsUnbuffered, count = "+e.length);var n=e.filter(this._validateAlert).sort(function(e,t){return t.priority-e.priority}).map(function(e){t._log.trace("Adding alert "+e.id);var n=t._getAlertsWithEqualRanges(e);if(t._tryToMatchDuplicate(e,n));else if(l.invariant(e.allowDuplicates||c.Alert.isAlert(e),"BaseAlertImpl must allow duplicates or be an Alert type"),e.allowDuplicates||!t._tryEnqueueAlert(e,n))return t._allAlerts[e.id]=e}).filter(Boolean);n.length&&(this.alertEvents.next({kind:"alert_added",alerts:n}),this._lensManager.addAlerts(n))},e.prototype._removeAlertInternal=function(e,t){var n=this;this._log.debug("_removeAlertInt(#"+e),a.Option.of(this._allAlerts[e]).fold(function(){return n._removeQueuedAlert(e)},function(r){delete n._allAlerts[e],delete n._capiAlertsIdMapping[r._raw.id],n.alertEvents.next({kind:"alert_removed",alerts:[r],undoable:t,source:c.AlertActionSource.api}),n._lensManager.removeAlerts([r])})},e.prototype._removeAlert=function(e){this._log.trace("_removeAlert(#"+e.fold(function(e){return e},function(e){return e})+")"),this._removeAlerts.next(e)},e.prototype._removeAlertsUnbuffered=function(e,t,n){var r=this;this._log.debug("_removeAlertsUnbuffered "+e);var i=e.filter(function(e){return!r._appliedAlerts.has(e)}).map(function(t){var n=r._allAlerts[t];return void 0!==n?(r._log.trace("_removeAlertsUnbuffered: Remove from alerts list "+t),delete r._allAlerts[t],delete r._capiAlertsIdMapping[n._raw.id],r._nextQueuedAlert(n.id,e).forEach(function(e){return r._addAlertsUnbuffered([e])})):r._removeQueuedAlert(t),n}).filter(Boolean);i.length&&(this.alertEvents.next({kind:"alert_removed",alerts:i,source:t,undoable:n}),this._lensManager.removeAlerts(i))},e.prototype._addRemoveAlertsBatch=function(e){var t=this,n=new Set,r=new Set;e.forEach(function(e){if(e instanceof c.BaseAlertImpl)n.add(e);else{var i=e.fold(function(e){return t._capiAlertsIdMapping[e]},function(e){return e});void 0!==i?r.add(i):t._log.trace("Remove from CAPI: Cannot find internal AlertId. capiId: "+e.swap().get())}});var i=[];n.forEach(function(e){r.has(e.id)&&i.push(e)}),i.forEach(function(e){n.delete(e),r.delete(e.id)}),n.size>0&&this._addAlertsUnbuffered(Array.from(n)),r.size>0&&this._removeAlertsUnbuffered(Array.from(r),c.AlertActionSource.api)},e.prototype._getAlertsWithEqualRanges=function(e){var t=this;return this._positionManager.findByRange(e.highlightRange).filter(u.RangeWithId.hasAlertId).map(function(e){return t._allAlerts[e.alertId]}).filter(Boolean)},e.prototype._tryEnqueueAlert=function(e,t){var n=this,r=t.filter(function(t){return!t.allowDuplicates&&t.lensId===e.lensId&&void 0!==n._allAlerts[t.id]}),i=e;if(r.length>0){l.invariant(1===r.length,"Only one visible alert to one range is expected, got "+r.map(function(e){return e.id})+" while _tryEnqueueAlert("+e.rawId+")");var o=r[0],a=this._queue[o.id]||[],s=void 0;o.extraProperties.priority<e.extraProperties.priority?(s=o.copy(),this._removeAlertInternal(o.id),delete this._queue[o.id]):(i=o,s=e),this._log.debug("Queueing alert "+s.id+" after "+i.id),this._queuedAlerts[s.id]=s,a.push(s.id);var c=a.filter(function(e){return n._queuedAlerts[e]});c.sort(function(e,t){return n._queuedAlerts[e].priority-n._queuedAlerts[t].priority}),this._queue[i.id]=c,c.length!==a.length&&this._log.error("this._queuedAlerts[a] is undefined, sizes: "+c.length+", "+a.length)}return i!==e},e.prototype._nextQueuedAlert=function(e,t){var n=this,r=this._queue[e];if(void 0!==r){delete this._queue[e];var i=r.filter(function(e){return void 0!==n._queuedAlerts[e]&&!t.some(function(t){return t===e})}),o=i.shift();if(void 0!==o){i.length>0?this._queue[o]=i:delete this._queue[o];var s=this._queuedAlerts[o];return delete this._queuedAlerts[o],a.Some(s)}}return a.None},e.prototype._removeQueuedAlert=function(e){this._log.debug("_removeQueuedAlert "+e),a.Option.of(this._queuedAlerts[e]).forEach(function(e){return e.dispose()}),delete this._queue[e],delete this._queuedAlerts[e],delete this._capiAlertsIdMapping[e]},e.prototype._commitToCapi=function(e,t){this._capiClient.capi.reportUserFeedback(e,t)},e.prototype.toString=function(){return JSON.stringify(this,void 0,2)},e.prototype.toJSON=function(){return{lenses:this._lensManager,allAlerts:this._allAlerts,queue:this._queue,queuedAlerts:this._queuedAlerts,idMapping:this._capiAlertsIdMapping}},e}();t.AlertManager=p},1695:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(31),i=n(0),o=n(14),a=n(157),s=n(6),l=n(125),c=n(3),u=n(77),d=function(){function e(e,t,n,a,c,u,d){var p=this;this.capi=e,this.events=t,this._documentModel=n,this._dialectSettings=a,this._log=s.Monitoring.Logging.getLogger("ObservableCAPIClientImpl"),this._subs=[],this._checkingStateInt=new r.Subject,this._log.debug("Constructing client with _hasAlertsCache = "+u),this._subs.push(this._documentModel.context.skip(1).subscribe(function(t){e.setContext(t),n.score.set(o.None),p._checkingStateInt.next(p.capi.checkingState)})),this._subs.push(this.events.subscribe(function(t){"finish"===t.kind?(p._dialectSettings.dialect.get().isEmpty()&&l.isDialectString(t.dialect)&&p._dialectSettings.setDialectWeak(t.dialect),p._checkingStateInt.next(p.capi.checkingState)):"session_started"===t.kind&&c.getContainerId().then(function(t){e.setOption("gnar_containerId",t)}).catch(function(e){p._log.warn("Can not send user container id",e)})}),this.events.filter(function(e){return"session_started"===e.kind||"queue_msgs_dropped"===e.kind}).switchMap(function(e){return"session_started"===e.kind?i.Observable.empty():i.Observable.of(void 0).delay(1e3)}).subscribe(function(){p._checkingStateInt.next(p.capi.checkingState)}));var f=t.filter(function(e){return"session_started"===e.kind}).skip(1).switchMap(function(){return t.filter(function(e){return"finish"===e.kind}).first().mapTo(!1).startWith(!0)}).startWith(!1),h=this._checkingStateInt.withLatestFrom(f,function(e,t){return t&&"full"===e?"checking":e}).share(),m=h.takeWhile(function(e){return"full"!==e}),g=h.filter(function(e){return"full"===e}).switchMap(function(){return m.combineLatest(i.Observable.timer(5e3),function(e){return e}).startWith("full")});this._subs.push(t.subscribe(function(e){"finish"===e.kind?n.score.set(e.score):"async_check_finished"===e.kind&&p._updateAsyncChecksState()})),this._subs.push(i.Observable.merge(m,g).skipWhile(function(e){return u&&"idle"!==e}).distinctUntilChanged().startWith(d>1?u?"checking":"full":"idle").subscribe(function(e){p._log.debug("Switching checking state to "+e),n.checkingState.set(e)}))}return e.prototype.pushChanges=function(e){this.capi.pushChanges(e),this._checkingStateInt.next(this.capi.checkingState),this._updateAsyncChecksState();a.Change.isDelta(e)&&e.prevLen>200&&e.prevLen+e.length<200&&(this._log.debug("Reseting score to None, not enough text remained"),this._documentModel.score.set(o.None))},e.prototype.dispose=function(){this._subs.forEach(function(e){return e.unsubscribe()})},e.prototype._updateAsyncChecksState=function(){this._documentModel.asyncChecksState.set(this.capi.asyncChecksState)},e}();t.ObservableCAPIClientImpl=d;!function(e){function t(e,t){var n=u.Reconnect.getDefaultReconnect(s.Monitoring.Logging.getLogger("CapiHandler"),u.Reconnect.ClientType.capi),o=function(t){return e.next(t)},a=new r.Subject;return a.switchMap(function(e){return"online"===e?i.Observable.of("online"):i.Observable.of("offline").delay(1e4)}).subscribe(function(e){return t.setState({type:"wsCapi",state:{type:e}})}),{onSessionStarted:o,onStartMessageAcknowledged:function(){a.next("online")},beforeAlert:o,onAlert:o,onRemove:o,onSynonyms:o,onPlagiarism:o,onAsyncCheckFinish:o,onError:o,onBeforeFinish:o,onFinish:o,onDisconnect:function(e,t,r,i){return a.next("offline"),n(e,t,r,i)},onQueueMsgDropped:o}}var n=function(){function e(){var e=this;this.events=new r.Subject,this.capi={accept:function(){},reportUserFeedback:function(){},enablePlagiarismSearch:c.noop,disablePlagiarismSearch:c.noop},this.activeAlerts=new Set,this.activeLensIds=new Set,this.fireAdd=function(t){e.activeAlerts.add(t),e.activeLensIds.add(t.cardLayout.group),e.events.next({kind:"before_alert"}),e.events.next({kind:"alert_received",alert:t})},this.fireRemove=function(t){e.activeAlerts.delete(t),e.activeLensIds.delete(t.cardLayout.group),e.events.next({kind:"alert_removed",alertId:t.id})}}return e.prototype.pushChanges=function(){},e}();e.Mock=n,e.getCapiHandler=t}(t.ObservableCAPIClient||(t.ObservableCAPIClient={}))},1696:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(14),i=n(7),o=n(6),a=n(54),s=n(3),l=function(){function e(e,t){this._doc=e,this.documentTitle=t,this.state=i.Atom.create(r.None),this.jobDetails=i.Atom.create(r.None)}return e.prototype.getPlans=function(){return this._doc.getProofitPlans()},e.prototype.placeOrder=function(e){var t=this;return this._doc.placeProofitOrder(e).then(function(e){return t._updateStatus(e.status)}).catch(function(e){o.Monitoring.Logging.getLogger("ProofitModel").warn("Error placing proofit order",e),t.state.set(r.Some({kind:"error",errorType:"unknown"}))})},e.prototype.updateState=function(e){this._updateStatus(e.status),this.jobDetails.set(r.Some({startTime:e.submitted,dueTime:e.due}))},e.prototype._updateStatus=function(e){switch(e){case a.Proofit.JobStatus.building:case a.Proofit.JobStatus.newJob:this.state.set(r.Some({kind:"submitted"}));break;case a.Proofit.JobStatus.completed:this.state.set(r.Some({kind:"finished"}));break;case a.Proofit.JobStatus.cancelled:this.state.set(r.Some({kind:"cancelled"}));break;case a.Proofit.JobStatus.emptyDocument:this.state.set(r.Some({kind:"error",errorType:"emptyDocument"}));break;case a.Proofit.JobStatus.duplicate:this.state.set(r.Some({kind:"error",errorType:"alreadyProofread"}));break;case a.Proofit.JobStatus.paymentError:this.state.set(r.Some({kind:"error",errorType:"payment"}));break;case a.Proofit.JobStatus.unknown:this.state.set(r.None);break;default:this.state.set(r.None)}},e}();t.DocumentProofitModelImpl=l;!function(e){var t=function(){function e(){this.state=i.Atom.create(r.None),this.jobDetails=i.Atom.create(r.None),this.documentTitle=i.Atom.create("My doc")}return e.prototype.getPlans=function(){return Promise.resolve({words:666,turnaroundOptions:[{enabled:!1,label:"30 minutes",minutesToProcess:30,perWord:.24,price:159.84,turnaround:a.Proofit.PlanType.Instant},{enabled:!0,label:"3 hours",minutesToProcess:180,perWord:.12,price:79.92,turnaround:a.Proofit.PlanType.ThreeHours},{enabled:!0,label:"24 hours",minutesToProcess:1440,perWord:.03,price:19.98,turnaround:a.Proofit.PlanType.TwentyFourHours}]})},e.prototype.placeOrder=function(){return Promise.resolve()},e.prototype.updateState=function(){s.noop()},e}();e.Mock=t}(t.DocumentProofitModel||(t.DocumentProofitModel={}))},1697:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(1792),s=n(1558),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.componentDidMount=function(){var e=this._el.children;this.props.onElementsReady({header:e[0].outerHTML,body:e[1].outerHTML,footer:e[2].outerHTML})},t.prototype.render=function(){var e=this;return i.createElement("div",{ref:function(t){null!==t&&(e._el=t)}},i.createElement(a.PDFReportHeader,{title:this.props.model.title}),i.createElement(a.PDFReportContent,{model:this.props.model}),i.createElement(a.PDFReportFooter,null))},t}(i.Component),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype._prepareHTML=function(e){return'<!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width"><title>Report</title><style>'+("function"!=typeof s.__$extract?"":s.__$extract())+"</style></head><body>"+e+"</body></html>"},t.prototype.render=function(){var e=this,t=this.props.reportViewModel;return i.createElement(o.F.div,{className:s.invisible},t.reportData.view(function(n){return n.map(function(n){return i.createElement(l,{model:n,onElementsReady:function(n){var r=n.header,i=n.footer,o=n.body;return t.generateReport(e._prepareHTML(o),r,i)}})}).orNull()}))},t}(i.Component);t.PDFReportGenerator=c},1698:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(122),a=n(1773),s=function(e){var t=e.header,n=e.description,r=e.measure,o=e.score;return i.createElement("section",{className:a.insightsSection},i.createElement("table",{className:a.insightTable},i.createElement("tbody",null,i.createElement("tr",{className:a.insightHeader},i.createElement("td",{className:a.insightTextHeader},t),i.createElement("td",{className:a.insightScore},o)),i.createElement("tr",{className:a.insightBody},i.createElement("td",{className:a.insightTextCell},n),i.createElement("td",{className:a.insightScoreCell},r)))))};t.PercentInsight=function(e){var t=e.score,n=r.__rest(e,["score"]);return i.createElement(s,r.__assign({},n,{score:("number"!=typeof t||t<0?0:t>100?100:Math.round(t))+"%"}))},t.DecimalInsight=function(e){var t=e.score,n=r.__rest(e,["score"]);return i.createElement(s,r.__assign({},n,{score:""+("number"!=typeof t?0:Math.round(10*t)/10)}))},t.DocumentInsightsSection=o.withContext(function(e,n){var r=e.stats,o=n.textResources;return i.createElement("div",null,i.createElement(t.PercentInsight,{header:o.denali.documentStats.uniqueWordsTitle,description:o.denali.documentStats.report.uniqueWordsDescription,measure:o.denali.documentStats.uniqueWordsTitle,score:r.uniqueWords}),i.createElement(t.PercentInsight,{header:o.denali.documentStats.rareWordsTitle,description:o.denali.documentStats.rareWords,measure:o.denali.documentStats.rareWordsTitle,score:r.rareWords}),i.createElement(t.DecimalInsight,{header:o.denali.documentStats.wordLengthTitle,description:o.denali.documentStats.report.wordLengthDescription,measure:o.denali.documentStats.report.wordLengthMeasure,score:r.wordLength}),i.createElement(t.DecimalInsight,{header:o.denali.documentStats.sentenceLengthTitle,description:o.denali.documentStats.report.sentenceLengthDescription,measure:o.denali.documentStats.report.sentenceLengthMeasure,score:r.sentenceLength}))})},1699:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1796);t.TitleSection=r.TitleSection;var i=n(1793);t.GeneralMetricsSection=i.GeneralMetricsSection;var o=n(1795);t.ScoreSection=o.ScoreSection;var a=n(1794);t.PlagiarismSection=a.PlagiarismSection;var s=n(1797);t.WritingIssuesSection=s.WritingIssuesSection;var l=n(1698);t.DocumentInsightsSection=l.DocumentInsightsSection},1700:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(23),i=n(14),o=n(7),a=n(6),s=n(1463),l=n(1504),c=n(315),u=n(3),d=12e3,p=function(){function e(e,t,n,u,p){var f=this;this._engine=e,this._profile=t,this._plagiarismVM=n,this._notifications=u,this._features=p,this._log=a.Monitoring.Logging.getLogger("ReportViewModelImpl"),this.reportData=o.Atom.create(i.None),this.downloadStarted=o.Atom.create(!1),this._requestSent=o.Atom.create(!1),this.beginDownload=function(){return f.downloadStarted.set(!0)},this._finishDownload=function(){f.downloadStarted.set(!1),f._requestSent.set(!1)},this._reportModel=r.Observable.combineLatest(this._engine.documentModel.title.view(function(e){return e||"Untitled"}),this._engine.documentModel.recentDocumentStats.switchMap(c.toOptionValueOnly),this._engine.documentModel.score.switchMap(c.toOptionValueOnly),this._engine.documentModel.counters,this._plagiarismVM.checkingState.switchMap(function(e){return e.percent},function(e,t){return f._features.isPremium?i.Some(f._engine.documentModel.extraSettings.checkedPlagiarism?{score:t,sources:e.sources,state:l.PlagiarismCheckingState.CHECKED}:{state:l.PlagiarismCheckingState.NOT_CHECKED}):i.None}),function(e,t,n,r,o){return i.Some({title:e,author:f._profile.get().fullName,stats:t,score:n.rank,criticalIssues:r.critical,advancedIssues:r.advanced,issues:f._calculateIssues(f._engine.alertsList.getAllAlertsAsArray().filter(s.Alert.isAlert)),plagiarism:o})}),this._subs=[this.downloadStarted.switchMap(function(e){return e?r.Observable.fromPromise(f._prepareDownload()).switchMapTo(f._reportModel.first()).timeout(d).catch(function(e){return f._log.error("Error while preparing PDF report",e),f._notifications.show(f._notifications.create.error()),f._finishDownload(),r.Observable.of(i.None)}):r.Observable.of(i.None)}).subscribe(c.toAtom(this.reportData))]}return e.prototype._prepareDownload=function(){return this._engine.documentModel.extraSettings.checkedPlagiarism&&!this._features.isFree?this._plagiarismVM.recheck():Promise.resolve()},e.prototype.tryToInterrupt=function(){this._requestSent.get()||this._finishDownload()},e.prototype._calculateIssues=function(e){return e.reduce(function(e,t){var n=t.toAlertLike().categoryHuman;return e[t.lensId]=e[t.lensId]||{},e[t.lensId][n]=e[t.lensId][n]||0,e[t.lensId][n]+=1,e},{})},e.prototype.generateReport=function(e,t,n){this._requestSent.get()||(this._requestSent.set(!0),this._engine.documentModel.generateReport(e,{headerTemplate:t,footerTemplate:n,format:"Letter",marginTop:"70px",marginBottom:"70px"}).then(this._finishDownload))},e.prototype.dispose=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},e}();t.ReportViewModelImpl=p;!function(e){var t=function(){function e(){this.downloadStarted=o.Atom.create(!1),this.beginDownload=u.noop,this.tryToInterrupt=u.noop,this.generateReport=function(){throw new Error("Method not implemented.")},this.reportData=o.Atom.create(i.None),this.dispose=u.noop}return e}();e.Mock=t}(t.ReportViewModel||(t.ReportViewModel={}))},1701:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(2),o=n(23),a=n(14),s=n(7),l=n(3),c=n(1465);!function(e){function t(){return{cards:[],cardsMap:new Map,height:0,active:a.None,activeIndex:a.None,lens:a.None}}e.empty=t}(r||(r={}));var u=function(){function e(e,t,n){var u=this;this._cardsVM=e,this._pageVM=t,this._screenContext=n,this.setupSidebar=function(){var e=[u._listenBaseActiveItemChange(),u._listenRegularHeightChange(),u._listenActiveHeightChange(),u._listenTitleHeightChange(),u._listenViewState(),u._listenViewportUpdate(),u._freezeActiveCardPosition(),u._ensureActiveCardPositionOnResize(),u._listenScrollChange(),u._setScrollPosition()];return{unsubscribe:function(){e.forEach(function(e){return e.unsubscribe()})}}},this._scrollWrapEl=s.Atom.create(a.None),this._viewportEl=s.Atom.create(a.None),this._titleEl=s.Atom.create(a.None),this._scrollUpdated=new o.Subject,this._titleHeight=s.Atom.create(0),this._resizeEvent=o.Observable.fromEvent(window,"resize",l.RxUtils.toVoid).share().startWith(l.RxUtils.voidValue),this._scrollOffset=new o.Subject,this._scrollPosition=s.Atom.create(0),this._viewPort=s.Atom.create({}),this._activeCard=s.Atom.create(a.Option.empty()),this._baseElements=s.Atom.create({active:a.None,regular:a.None}),this._onUpdate=this._activeCard.switchMap(l.RxUtils.toOptionValueOnly).switchMap(function(e){return u._cardsVM.getState(e)}).map(function(e){return e.transition}).distinctUntilChanged().switchMap(l.RxUtils.Scheduler.rafScheduler).share(),this._baseHeight=s.Atom.create({active:a.None,regular:a.None}),this._regularHeight=this._baseHeight.view(function(e){return e.regular.map(function(e){return e.height}).getOrElse(0)}),this._viewState=s.Atom.create(r.empty()),this._focusedLens=this._pageVM.state.view(c.LensState.mapper(function(e){var t=e.alertSource,n=e.currentLens;return a.Some({visibleCards:n.visibleCards,card:n.card,cardIndex:n.cardIndex,alertSource:t,currentLens:{id:n.id,count:n.meta.count}})},function(e){var t=e.currentLens,n=e.alertSource;return t.card.map(function(e){return{visibleCards:t.visibleCards,card:e,cardIndex:t.cardIndex.get(),alertSource:n,currentLens:{id:t.id,count:t.meta.count}}})})),this.updateBasic=function(e,t){switch(t.type){case"active":u._baseElements.modify(function(n){return i.__assign({},n,{active:a.Some({id:t.id,el:e})})});break;case"regular":u._baseElements.modify(function(t){return i.__assign({},t,{regular:a.Some({el:e})})});break;default:l.assertNever(t)}},this.activeCardRendered=o.Observable.combineLatest(this._viewState.view("active"),this._baseHeight).filter(function(e){var t=e[0],n=e[1];return l.isOptionsEq(t.map(function(e){return{id:e.activeAlert.id,height:e.height}}),n.active,function(e,t){return e.id===t.id&&e.height===t.height})}).map(function(e){return e[0]}),this._viewportData=s.Atom.combine(this._viewPort,this._screenContext.screen.remSize,function(e,t){return{viewport:e,rem:t}}),l.registerDebugHelper("viewState",function(){return u._viewState.get()}),l.registerDebugHelper("viewStateInfo",function(){var e=u._viewState.get(),t={active:e.active.map(function(e){return{cardId:e.cardId,activeAlert:e.activeAlert.id,absTop:e.absTop,height:e.height,animate:e.animate}}).orNull(),cards:e.cards.map(function(e){return{id:e.cardId,alerts:e.alerts.map(function(e){return e.id})}}),height:e.height,lens:e.lens.map(function(e){return e.id}).orNull()};return JSON.stringify(t,void 0,2)})}return e.prototype.view=function(e){var t=function(t){return t.forAll(function(t){return e.id===t})},n=this._viewState.filter(function(e){return t(e.lens.map(function(e){return e.id}))}),r=n.map(function(e){return e.height}).distinctUntilChanged().startWith(0);return{lens:e,viewState:n,totalHeight:r,scrollUpdated:this._scrollUpdated,baseElements:{viewport:this._viewportEl,scroll:this._scrollWrapEl,title:this._titleEl}}},e.prototype._listenViewState=function(){return o.Observable.combineLatest(this._focusedLens.switchMap(l.RxUtils.toOptionValueOnly).distinctUntilChanged(),this._baseHeight,this._titleHeight,this._activeCard.switchMap(l.RxUtils.toOptionValueOnly).pairwise().map(function(e){var t=e[0],n=e[1];return t.activeAlert.lensId!==n.activeAlert.lensId}).startWith(!0).distinctUntilChanged(),this._viewPort,function(e,t,n,r){return{visibleCards:e.visibleCards,activeCard:e.card,cardIndex:e.cardIndex,alertSource:e.alertSource,currentLens:e.currentLens,basic:t,titleHeight:n,lensChanged:r}}).filter(function(e){return e.basic.regular.exists(function(e){return e.height>0})}).scan(e._reduceViewState,r.empty()).subscribe(l.RxUtils.toAtom(this._viewState))},e.prototype._listenViewportUpdate=function(){return this._withResizeEvent(this._viewportEl).switchMap(l.RxUtils.Scheduler.rafScheduler).switchMap(l.RxUtils.toOptionValueOnly).map(function(e){return e.getBoundingClientRect()}).distinctUntilChanged(function(e,t){return e.top===t.top&&e.height===t.height&&e.width===t.width}).subscribe(l.RxUtils.toAtom(this._viewPort))},e.prototype._listenRegularHeightChange=function(){var e=this;return this._withEvents(this._baseElements.view("regular"),this._resizeEvent,this._onUpdate).switchMap(l.RxUtils.Scheduler.rafScheduler).map(l.OptionUtils.map(function(e){return{height:e.el.offsetHeight}})).distinctUntilChanged(function(e,t){return l.isOptionsEq(e,t,function(e,t){return e.height===t.height})}).subscribe(function(t){return e._baseHeight.modify(function(e){return i.__assign({},e,{regular:t})})})},e.prototype._listenActiveHeightChange=function(){var e=this;return this._withEvents(o.Observable.combineLatest(this._baseElements.view("active"),this._activeCard),this._resizeEvent,this._onUpdate).switchMap(l.RxUtils.Scheduler.rafScheduler).filter(function(e){var t=e[0],n=e[1];return t.map(function(e){return e.id}).equals(n.map(function(e){return e.activeAlert.id}))}).map(function(e){var t=e[0],n=e[1];return t.map(function(e){var t=e.el,r=e.id;return{height:t.offsetHeight,lensId:n.map(function(e){return e.activeAlert.lensId}).get(),id:r}})}).distinctUntilChanged(function(e,t){return l.isOptionsEq(e,t,function(e,t){return e.height===t.height&&e.id===t.id})}).subscribe(function(t){return e._baseHeight.modify(function(e){return i.__assign({},e,{active:t})})})},e.prototype._listenTitleHeightChange=function(){return this._withResizeEvent(this._titleEl).switchMap(l.RxUtils.Scheduler.rafScheduler).map(function(e){return e.fold(function(){return 0},function(e){return e.offsetHeight})}).subscribe(l.RxUtils.toAtom(this._titleHeight))},e.prototype._listenBaseActiveItemChange=function(){return this._focusedLens.view(l.OptionUtils.map(function(e){return e.card})).distinctUntilChanged(function(e,t){return l.isOptionsEq(e,t,function(e,t){return e.activeAlert.id===t.activeAlert.id})}).subscribe(l.RxUtils.toAtom(this._activeCard))},e.prototype._freezeActiveCardPosition=function(){var e=this;return this._viewState.view(function(e){return{item:e.active,index:e.activeIndex}}).startWith({item:a.None,index:a.None}).pairwise().subscribe(function(t){var n=t[0],r=t[1],i=l.isOptionsEq(n.item,r.item,function(e,t){return e.cardId===t.cardId}),o=!n.index.equals(r.index);i&&o&&a.Option.map2(n.item,r.item,function(e,t){return t.absTop-e.absTop}).filter(function(e){return 0!==e}).forEach(function(t){e._scrollOffset.next({offset:t,animate:!1})})})},e.prototype._listenScrollChange=function(){return this._scrollWrapEl.switchMap(l.RxUtils.toOptionValueOnly).switchMap(function(e){return o.Observable.fromEvent(e,"scroll",{passive:!0}).map(function(){return e.scrollTop}).startWith(e.scrollTop)}).subscribe(l.RxUtils.toAtom(this._scrollPosition))},e.prototype._setScrollPosition=function(){var e=this;return this._scrollWrapEl.switchMap(l.RxUtils.toOptionValueOnly).switchMap(function(t){return e._scrollOffset.switchMap(function(e){var n=e.offset,r=e.animate,i=t.scrollTop,a=i+n;return r?l.Animation.createAnimationObservable(i,a,200):o.Observable.of(a)}).do(function(e){t.scrollTop=e}).mapTo(void 0)}).subscribe(this._scrollUpdated)},e.prototype.ensureCardPosition=function(e,t,n){var r=this;void 0===t&&(t=!0),void 0===n&&(n=a.Option.empty());var i=this._viewState.get().cardsMap.get(e);if(!i)throw new l.InvariantError("Cannot get the position for an absent card");var o=this._viewportData.get(),s=o.viewport,c=o.rem,u=this._regularHeight.get(),d=Math.round(3.25*c),p=Math.round(i.absTop-this._scrollPosition.get()+s.top),f=n.fold(function(){return r._getCardViewportOffset({top:p,height:i.height,baseHeight:u,viewport:s,rem:c})},function(e){return p-e+d+r._getCardViewportOffset({top:e,height:i.height,baseHeight:u,viewport:s,rem:c})});return 0===f?{top:p,contentOffset:d}:(this._scrollOffset.next({offset:f,animate:t}),{top:p-f,contentOffset:d})},e.prototype._ensureActiveCardPositionOnResize=function(){var e=this;return this._resizeEvent.withLatestFrom(this.activeCardRendered,this._regularHeight,this._viewportData).filter(function(e){e[0];return e[1].nonEmpty()}).subscribe(function(t){var n=(t[0],t[1]),r=t[2],i=t[3],o=i.viewport,a=i.rem,s=n.get(),l=Math.round(s.absTop-e._scrollPosition.get()+o.top),c=e._getCardViewportOffset({top:l,height:s.height,baseHeight:r,viewport:o,rem:a});e._scrollOffset.next({offset:c,animate:!1})})},e.prototype._getCardViewportOffset=function(e){var t=e.top,n=e.baseHeight,r=e.height,i=e.rem,o=e.viewport,a=n,s=a+i,l=t-s,c=t+r+a,u=o.top+o.height;if(r>o.height)return t-o.top;if(r+s>o.height){var d=Math.min(s,o.height-r);return t-o.top-d}return l<o.top?l-o.top:c>u?c-u:0},e.prototype._withEvents=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return o.Observable.combineLatest.apply(o.Observable,[e].concat(t)).map(function(e){return e[0]})},e.prototype._withResizeEvent=function(e){return this._withEvents(e,this._resizeEvent)},e._reduceViewState=function(e,t){var n=t.visibleCards,r=t.activeCard,o=t.cardIndex,s=t.alertSource,l=t.currentLens,u=t.basic,d=t.titleHeight,p=t.lensChanged,f=e.lens.filter(function(e){return e.id===l.id}).flatMap(function(){return e.active}),h=f.exists(function(e){return e.cardId!==r.cardId})||f.flatMap(function(){return e.activeIndex}).forAll(function(e){return e===o}),m=!p,g=n.reduce(function(t,n){var r=e.cardsMap.get(n.cardId),o=n.scheduledToDispose?0:u.active.exists(function(e){return n.alerts.some(function(t){return t.id===e.id})})?u.active.map(function(e){return e.height}).getOrElse(0):u.regular.map(function(e){return e.height}).getOrElse(0),a=i.__assign({},n,{visible:!0,absTop:t.height,height:o,animate:s!==c.ForceAlertActionSource.forceSidebar&&!!r&&0!==r.height&&m&&h});return t.cards.push(a),t.cardsMap.set(n.cardId,a),t.height+=o,t},{cards:[],height:d,cardsMap:new Map}),v=g.cards,_=g.height,b=g.cardsMap;return{cards:v,cardsMap:b,height:_,active:a.Option.of(b.get(r.cardId)),activeIndex:a.Some(o),lens:a.Some(l)}},e}();t.ScrollerViewModelImpl=u;!function(e){var t=function(){function e(){this.setupSidebar=function(){return{unsubscribe:l.noop}},this.updateBasic=l.noop,this.activeCardRendered=s.Atom.create(a.Option.empty())}return e.prototype.view=function(){throw new Error("Method not implemented.")},e.prototype.ensureCardPosition=function(){throw new Error("Method not implemented.")},e}();e.Mock=t}(t.ScrollerViewModel||(t.ScrollerViewModel={}))},1703:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(1464),s=n(3),l=n(1641),c=n(1467),u=n(1729),d=n(1577),p=["Conjunctions","Determiners","Fluency","Modifiers","Nouns","Numerals","Prepositions","Pronouns","Punctuation","Syntax","Spelling","Verbs","Word Order"],f=["Conciseness","References","Voice"],h=["Formality","Sensitivity","Variety","Vocabulary","Conventions"];t.AllNavigationLenses=p.map(function(e){return{id:e,category:a.Lens.Category.Accuracy,type:a.Lens.Type.Critical}}).concat(f.map(function(e){return{id:e,category:a.Lens.Category.Clarity,type:a.Lens.Type.Advanced}}),h.map(function(e){return{id:e,category:a.Lens.Category.Effectiveness,type:a.Lens.Type.Advanced}})).map(function(e){return r.__assign({},e,{category:e.category,codeName:e.id,title:e.id,priority:Math.trunc(100*Math.random()),description:"",exclusiveHighlights:!1})}),t.DotsLoader=function(e){var t=e.onTransitionEnd,n=o.Atom.create(!1);return requestAnimationFrame(function(){return requestAnimationFrame(function(){return n.set(!0)})}),i.createElement("span",null,i.createElement(o.F.span,{className:u.dot,style:{opacity:n.view(Number)}},"."),i.createElement(o.F.span,{className:u.dot,style:{opacity:n.view(Number)}},"."),i.createElement(o.F.span,{className:u.dot,style:{opacity:n.view(Number)},onTransitionEnd:t},"."))};var m=5,g=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n._lensesArray=o.Atom.create(Array.from({length:m}).map(function(e,t){return{id:t+"empty",codeName:"",title:"",type:a.Lens.Type.Critical,category:a.Lens.Category.Accuracy,description:"",priority:0,exclusiveHighlights:!1}}).concat(s.ArrayUtils.shuffle(t.AllNavigationLenses))),n._updateLensArray=function(){n._lensesArray.modify(function(e){var t=e.slice(0),n=t.shift();return n&&""!==n.title&&t.push(n),t})},n}return r.__extends(n,e),n.prototype.render=function(){var e=this;return i.createElement("div",{className:u.wrapper},i.createElement(o.F.div,{className:u.checkingWrapper},this._lensesArray.view(function(n){return n.map(function(n,r){var o=n.id,a=n.title;return i.createElement(l.FlowPosition,{key:o,offset:100*r+"%",theme:d},i.createElement(c.P2,{className:u.item},a,r===m&&i.createElement(t.DotsLoader,{onTransitionEnd:e._updateLensArray})))})})))},n}(i.Component);t.Rechecking=g},1704:function(e,t,n){"use strict";function r(e,t,n){return s.Observable.create(function(r){var i=e.animate(t,n);return i.oncancel=i.onfinish=function(){return r.complete()},function(){return i.finish()}})}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(13),a=n(7),s=n(0),l=n(3),c=n(122),u=n(1461),d=n(1494),p=n(573),f=n(1732),h="checking-complete",m=164,g=(28-p.Icon.GPath.size)/2,v=p.Icon.GPath.size+2,_=(28-v)/2,b=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._label=a.Atom.combine(t.props.checking,t.props.minimized,t.props.hasErrors,function(e,n,r){var i=e?t.context.textResources.denali.sidebar.checkingLabel:r?t.context.textResources.denali.sidebar.fixErrorsLabel:t.context.textResources.denali.sidebar.openLabel;return n?"":o.createElement("div",{className:f.labelReveal,key:"label","data-name":i},i)}),t._checkingState=l.Animation.fadeOutState(t.props.checking.skipWhile(function(e){return!1===e})),t._spinnerState=t._checkingState.state.share().startWith(t.props.checking.get()?"inProgress":"end"),t._spinner=t._spinnerState.map(function(e){return"end"!==e?o.createElement(d.Spinner.Svg,{key:"loading",type:"white",size:v,strokeWidth:5,className:"fadeOut"===e?f.fadeOut:void 0,onTransitionEnd:t._checkingState.complete,x:m+_,y:_}):null}),t._logo=s.Observable.combineLatest(t._spinnerState,t.props.minimized,function(e,t){return"inProgress"===e?null:t?[o.createElement(p.Icon.GPath,i.__assign({},a.classes(f.reveal),{transform:"translate("+(m+g)+" "+g+")",key:"logo"})),o.createElement("g",{"data-name":h,key:"complete"})]:o.createElement("g",{"data-name":h,key:"complete"})}),t}return i.__extends(t,e),t.prototype.render=function(){return o.createElement(u.Button,{name:"assistant",className:this.props.minimized.view(function(e){return e?f.mini:f.full}),disabled:this.props.minimized,onClick:this.props.onClick},o.createElement(w,{closed:this.props.minimized},this._logo,this._spinner),this._label)},t}(c.BaseComponent);t.AssistantButton=b;var y=a.lift(function(e){return o.createElement("g",i.__assign({},e))}),w=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateToOffset=function(e){return e?m:0},t.stateToTransform=function(e){return"translateX("+t.stateToOffset(e)+"px)"},t}return i.__extends(t,e),t.prototype.componentDidMount=function(){var e=this;this.props.closed.map(this.stateToTransform).pairwise().switchMap(function(t){return r(e.el,{transform:t},{duration:300,easing:"ease-in",fill:"forwards"})}).subscribe()},t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.render=function(){var e=this,t=this.props.closed.get();return o.createElement("svg",{viewBox:"0 0 192 28",className:l.BrowserInfo.isIEorEdge()?f.edgeBackground:f.background},o.createElement("defs",null,o.createElement("mask",{id:"mask"},o.createElement("circle",{cx:14,cy:14,r:14,fill:"#fff"}),o.createElement("rect",{x:14,width:m,height:28,fill:"#fff"}),o.createElement("circle",{cx:14+m,cy:14,r:14,fill:"#fff"})),o.createElement("clipPath",{id:"clip"},o.createElement("circle",{cx:178,cy:14,r:14}),o.createElement("rect",{x:-14,width:192,height:28,fill:"#fff"}))),o.createElement("g",{clipPath:"url(#clip)"},o.createElement("rect",{id:"box",x:"0",y:"0",width:192,height:28,mask:"url(#mask)",ref:function(t){return e.el=t},transform:"translate("+this.stateToOffset(t)+", 0)"})),o.createElement(y,null,this.props.children))},t}(o.Component)},1706:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(1707),a=n(23),s=n(3),l=function(){return n.e(10).then(n.bind(null,1705)).then(function(e){return e.Illustration})};t.getIllustration=function(){var e=new a.BehaviorSubject(o.StaticIllustration);return a.Observable.defer(l).retryWhen(s.Async.OperationRetrier.RetryStrategy.linear(3,1e3)).first().subscribe(e),e.getValue.bind(e)}();var c=function(e){function n(){var n=e.call(this)||this;return t.getIllustration(),n}return r.__extends(n,e),n.prototype.render=function(){return i.createElement("div",null)},n}(i.Component);t.IllustrationPreload=c},1707:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(1738),s=function(e){var t=e.className,n=e.width,s=void 0===n?"11.5rem":n;return i.createElement("div",r.__assign({},o.classes(t,a.wrapper,a.nothingToCheck)),i.createElement("svg",{height:"100%",viewBox:"0 0 181 209",width:s},i.createElement("defs",null,i.createElement("rect",{id:"a",width:"141",height:"100",rx:"15"})),i.createElement("g",{transform:"translate(-51 -60)",fill:"none",fillRule:"evenodd"},i.createElement("path",{d:"M0 0h272v288H0z"}),i.createElement("path",{d:"M153.5 269c34 0 37-1.3 37-3s-3-3-37-3-61.5 1.3-61.5 3 27.5 3 61.5 3z",fill:"#F2F3FA"}),i.createElement("g",{transform:"translate(51 69)"},i.createElement("mask",{id:"b",fill:"#fff"},i.createElement("use",{xlinkHref:"#a"})),i.createElement("use",{fill:"#979DFF",xlinkHref:"#a"}),i.createElement("g",{mask:"url(#b)",fill:"#A5AAFE"},i.createElement("path",{d:"M-3.7 138.6V87.4h17.6l-.2 1.3v15.4c0 2.3 1.8 4.2 4.1 4.2h16.5v30.3h-38zm38-41.3v2.7H22V88.2l12.3 9zm6.6-5.5L24.7 80c-.8-.5-1.6-.8-2.5-.8h-30a4.1 4.1 0 0 0-4.2 4.1v59.5c0 2.3 1.9 4.2 4.1 4.2h46.4c2.3 0 4.1-1.9 4.1-4.2V95.2c0-1.3-.6-2.6-1.7-3.4zm193.2-66.5h-58.8a4.1 4.1 0 1 0 0 8.3H234a4.1 4.1 0 1 0 0-8.3m-113.2 76.2H86.5a4.1 4.1 0 1 0 0 8.3h34.3a4.1 4.1 0 1 0 0-8.3m0 17.9h-59a4.1 4.1 0 1 0 0 8.3h59a4.1 4.1 0 1 0 0-8.3m-27.2 18.4H62a4.1 4.1 0 1 0 0 8.3h31.7a4.1 4.1 0 1 0 0-8.3M53.1 41H23.3a4.1 4.1 0 1 0 0 8.2h29.8a4.1 4.1 0 1 0 0-8.2M-7 49.2H5.8a4.1 4.1 0 1 0 0-8.2H-7a4.1 4.1 0 1 0 0 8.2m58.9 10.5H-7A4.1 4.1 0 1 0-7 68h58.9a4.1 4.1 0 1 0 0-8.3m79.2-20.1a4.7 4.7 0 1 0-.1-9.4 4.7 4.7 0 0 0 .1 9.4M73.4 14.5a4.7 4.7 0 1 0 .1 9.5 4.7 4.7 0 0 0-.1-9.5M-3.1-8.1a4.7 4.7 0 1 0-.1-9.5 4.7 4.7 0 0 0 0 9.5M19.3-13a4.7 4.7 0 1 0-9.5.2 4.7 4.7 0 0 0 9.5-.1m97.5 150.1a4.7 4.7 0 1 0 .1 9.5 4.7 4.7 0 0 0 0-9.5M186.7-9.2a8.8 8.8 0 1 1 0 17.6 8.8 8.8 0 0 1 0-17.6m0 25.9a17.1 17.1 0 1 0 0-34.2 17.1 17.1 0 0 0 0 34.2M25.2 33a4.1 4.1 0 1 0 0-8.3 8.8 8.8 0 0 1 0-17.6 4.1 4.1 0 1 0 0-8.2 17.1 17.1 0 0 0 0 34.1m131.5 13.8a4.1 4.1 0 0 0-4.2 4.1 8.8 8.8 0 0 1-17.6 0 4.1 4.1 0 0 0-8.2 0 17.1 17.1 0 0 0 34.1 0 4 4 0 0 0-4.1-4M73.6 30a4.1 4.1 0 0 0-4.1 4.1v25.2a4.1 4.1 0 0 0 8.2 0V34a4 4 0 0 0-4.1-4.1M-3.2-.5a4.1 4.1 0 0 0-4.1 4.1v25.2a4.1 4.1 0 0 0 8.3 0V3.6C1 1.3-1-.5-3.2-.5m94.8 63.9c2.2 0 4.1-1.8 4.1-4.1V14.4a4.1 4.1 0 0 0-8.3 0v44.9c0 2.3 1.9 4.1 4.2 4.1m17.7-75.2a4.1 4.1 0 0 0-4.1 4.2v66.9a4.1 4.1 0 0 0 8.2 0v-67a4 4 0 0 0-4.1-4M35.8 20.6a4.1 4.1 0 0 0 5.9 0l4.2-4.2 4.3 4.2a4.1 4.1 0 1 0 5.9-5.8l-4.3-4.3L56 6.2A4.1 4.1 0 1 0 50.2.4l-4.3 4.3L41.7.4a4.1 4.1 0 0 0-5.9 5.8l4.3 4.3-4.3 4.3a4.1 4.1 0 0 0 0 5.8m92.1-14.4a4.1 4.1 0 0 0 5.8 0L138 2l4.3 4.2A4.1 4.1 0 1 0 148 .4L144-4l4-4a4.1 4.1 0 1 0-5.8-5.9L138-9.7l-4.3-4.3a4.1 4.1 0 0 0-5.8 5.9L132-4l-4 4.4a4.1 4.1 0 0 0 0 5.8m103.8 54.6l-13.7-9c-1.4-1-3.2-1-4.5 0L202 59.3l-12.8-7.5c-1.4-.8-3-.7-4.4.1l-13.2 8.8a4.1 4.1 0 1 0 4.6 7l11-7.4 12.9 7.4c1.3.8 3 .8 4.4 0l11.3-7.6 11.4 7.5a4.1 4.1 0 0 0 4.6-6.9M62.8 91c.8 0 1.6-.3 2.3-.7l11-7.4 13 7.5c1.3.8 3 .7 4.3-.1l11.4-7.6 11.4 7.6a4.1 4.1 0 0 0 4.5-7l-13.6-9c-1.4-1-3.2-1-4.6 0l-11.6 7.6-12.8-7.5c-1.4-.7-3-.7-4.4.2l-13.2 8.8a4.1 4.1 0 0 0 2.3 7.5m94.6-77.2a4.1 4.1 0 0 0-4.2 4.1v19.4a4.1 4.1 0 0 0 8.3 0V17.8a4 4 0 0 0-4.1-4.1"})),i.createElement("rect",{fill:"#8383EF",mask:"url(#b)",x:"20",y:"29",width:"63",height:"85",rx:"5"})),i.createElement("rect",{fill:"#FFF",x:"67",y:"94",width:"63",height:"85",rx:"5"}),i.createElement("path",{d:"M117.5 186H69a5 5 0 0 1-5-5v-22.2",stroke:"#3B3E4D",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("g",{strokeLinecap:"round"},i.createElement("path",{fill:"#FFF",d:"M167.7 169.5v-41.2l-4.3-5.7-9.9 9.7-29.1-5.3 1.2-6.6 22.7 2.2 17.9-20.7 11.6-4.5v-5.1h-2.5l-2.4-2.2-.6-4H171l1.3-6.6.6-8.7 1.6-3.1 21.7 2.2 1.6 92.2-5.6 7.4z"}),i.createElement("path",{d:"M123.8 124.2h-4l-6.3.3a6.4 6.4 0 0 1-2.5-3.3c-.4-1.4-.3-2.8.4-4.4l14.6 3-2.2 4.4zm56.4-16.8l-3.8-2-1.4-6.9 2.6-1.3.5-5.5H174l-1.4-4-.8-1.8-1.5.4 2.3-6.2v-7.2l2.4 3.4 5.2 1.8 1.9.5 1 2.3 3.5.8.5 1.6-1.3 2.1V87l2.2 2.2 1.4 1-2.3 4.3v4l2.3.8-1.4 3.4-3.1 3.3-2.4 1.4z",fill:"#A6ADC9"}),i.createElement("path",{d:"M180.7 64.6c-2.3 1.4 7.8.9 13.2 14.3 3 .5 4.2-1 3.6-4.5a21 21 0 0 0 8 11.3c5 3 14 8.2 16.6 11.9 2.7 3.6 2.5 10.1-1.4 12.1-2.7 1.3-.9.8 5.3-1.6l4-5.8.7-6.5-2.9-5.3-4.8-3.8-6-4.7-4.2-6.5-1.9-7.6-2.5-4.9-3.8-2h-4.4l-2.7 1.6-1.7 2-2.4-1-1.3 1.9-3.9-1-6.2-.5c.7-.5.2-.3-1.3.6z",fill:"#F2F3FA"}),i.createElement("path",{d:"M184.1 259.8l2 1.2c1.7-.1 3-.5 3.8-1.2.7-.5 1-1.4.8-2.5l-5.3-.2-1.3 2.7z",fill:"#A6ADC9"}),i.createElement("path",{d:"M164.4 123c1 2.8 2.6 6 7.7 5.1 5-.8 1.9-6.2-2.1-6.2s-6.6-1.6-5.6 1.1z",fill:"#F2F3FA"}),i.createElement("path",{d:"M208 173.3l.5 7.8c2.4 1.3 4 1.4 4.6.3.6-1.2.6-2.8 0-4.8l-2.7-4.8-2.4 1.5z",fill:"#A6ADC9"}),i.createElement("path",{d:"M196.1 127l-6.2 7.7c-1.3 2.1-1.3 6.5 0 13.3 2 10 2 18.4 0 29.3-1.3 7.3-1.9 33.7-1.9 79.2h3l3.5-61.6 1.6-19.7 1.7-10.2-1.7-13.6-1.6-12.3 1.6-12.1zm-3.3-25.5c2.8 2.7 4.4 5 5 7.2.7 2.1 4.5 23.1 11.6 63h1.8l-10.6-67.5-7.8-2.7zm-18.9 73.2l-1 27.8a4 4 0 0 0 1.3 3l4.4 4.3-4.7-35z",fill:"#F2F3FA"}),i.createElement("path",{stroke:"#3B3E4D",strokeWidth:"2",strokeLinejoin:"round",d:"M177.9 91.8v5.6l-11.7 4.2-17.8 21.4-22.9-3.3-1.3 6.8 29.1 5.8 10.1-9.9"}),i.createElement("path",{d:"M175 98.7c.2 5.8 2.1 8.6 5.7 8.6s6.5-2.7 8.8-8.1m-19.8 9.7l-6.4 12.2c.7 2.3 2.1 4.6 4.2 6.7v40l-4.9 36.3a8 8 0 0 0 2.2 6.6l10 10.2 6 6.2m-17.5-105.5h9",stroke:"#3B3E4D",strokeWidth:"2",strokeLinejoin:"round"}),i.createElement("path",{d:"M174.7 174l9.8 83h6.7c1.4-26 2.7-51 3.8-75.2.9-11 1.7-10.2 1.7-16.1 0-6-2.3-20.4-2.3-24 0-2.3.6-7.1 1.9-14.3",stroke:"#3B3E4D",strokeWidth:"2",strokeLinejoin:"round"}),i.createElement("path",{d:"M192.2 86c-3 3.9-4.9 7.8-5.4 11.7l13.8 6.6 10.5 67.2-3.9 1-5.6-24m-9.3 87.7l12 11.3m-36.7-95.2h17.2M180 91.8h-4.5a3 3 0 0 1-3-3v-2.6h-2l2-6.2v-6.2c0-4.5 3.4-9.7 10.7-9.7 5 0 8.4 1 10.2 3 1.4 1.6 2.1 3 2.1 4.2M191 266.4h-22.2c0-1.3 1-2.4 2.2-2.7l11-2.5c2-.7 3-2.1 3-4.1m23-14.1l7.4 5.7-13.5 17.4a3 3 0 0 1-.9-3.4l4.8-10c.7-2.1.2-3.8-1.4-5m6.4-75.7c1 1.8 1.7 3.5 2 5.2.7 2.5-.7 7.7 1 12M208 173v6c0 .8.4 1.6 1 2m-83.4-61.2l-20.7-3.8m6.1 4.9c.5 2 1.8 3.4 3.8 3.8 3 .6 4-1.7 9.2-.6m71.4-59.7a8 8 0 0 1 7.8-3.4c8.7.9 6.3 10.8 11.5 18.5 3.7 5.4 9.2 8.1 11.1 9.7 1 .8 2.6 2.4 3.5 4.4.9 1.9 1 4.2.8 6-.6 5-3.4 10.4-13 10.4",stroke:"#3B3E4D",strokeWidth:"2",strokeLinejoin:"round"}),i.createElement("path",{d:"M197 66.5c-.6-1-1.4-1.9-2.5-2.6-1.7-1-3.6 1-1.1 3.3m-34.9 199.3h50.9M173 71c-.8 2.6 1.1 6.8 6.3 6.8h1.2c1 0 1.8.8 1.8 1.8s.8 1.8 1.8 1.8h1.4c.8 0 1.4.6 1.4 1.4v.2c0 .7-.3 1.5-.9 2-.6.5-.7 1.4-.3 2.1.8 1.2 2 2 3.7 2.7m-5.3 170a6 6 0 0 0 4.7.5",stroke:"#3B3E4D",strokeWidth:"2",strokeLinejoin:"round"})),i.createElement("path",{d:"M62 99h-5m6.3-4.6L59 92m7.8-1l-2.5-4.2M72 90v-5",stroke:"#3B3E4D",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"}),i.createElement("path",{d:"M77 104v13",stroke:"#15C39A",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))))},l=function(e){var t=e.className,n=e.width,s=void 0===n?"10rem":n;return i.createElement("div",r.__assign({},o.classes(t,a.wrapper,a.noIssuesFound)),i.createElement("svg",{height:"100%",viewBox:"0 0 148 258",width:s},i.createElement("defs",null,i.createElement("rect",{id:"a",width:"148",height:"105",rx:"15"})),i.createElement("g",{fill:"none",fillRule:"evenodd"},i.createElement("path",{d:"M-53-13h272v288H-53z"}),i.createElement("g",{transform:"translate(0 103)"},i.createElement("mask",{id:"b",fill:"#fff"},i.createElement("use",{xlinkHref:"#a"})),i.createElement("use",{fill:"#6FC8E3",xlinkHref:"#a"}),i.createElement("g",{mask:"url(#b)",fill:"#84D5EE"},i.createElement("path",{d:"M102.8-3h32.3L118.6 7 102.8-3zm-7.7 25.2v-20l21.1 13.6a4.3 4.3 0 0 0 4.6 0L143 2.3v20H95zm-4.3 8.6h56.6c2.4 0 4.3-1.9 4.3-4.3V-7.3c0-2.3-2-4.3-4.3-4.3H90.8c-2.4 0-4.3 2-4.3 4.3v33.8c0 2.4 1.9 4.3 4.3 4.3zm43.5 70c-2-1.2-4.7-.5-5.9 1.5l-15.8 27-9.1-8.8a4.3 4.3 0 0 0-6 6.2l13 12.5a4.3 4.3 0 0 0 6.7-.9l18.7-31.6c1.2-2 .5-4.7-1.6-5.9m-118-60.2h61.2a4.3 4.3 0 1 0 0-8.6H16.3a4.3 4.3 0 1 0 0 8.6m0 18.6h61.2a4.3 4.3 0 1 0 0-8.6H16.3a4.3 4.3 0 1 0 0 8.6m107.4 90.4H62.5a4.3 4.3 0 1 0 0 8.6h61.2a4.3 4.3 0 1 0 0-8.6m-20.3-79.9H93a4.3 4.3 0 1 0 0 8.6h10.4a4.3 4.3 0 1 0 0-8.6m0 18H93a4.3 4.3 0 1 0 0 8.6h10.4a4.3 4.3 0 1 0 0-8.6m45.3-18h-29.3a4.3 4.3 0 1 0 0 8.6h29.3a4.3 4.3 0 1 0 0-8.6m-99.4 0h-33a4.3 4.3 0 1 0 0 8.6h33a4.3 4.3 0 1 0 0-8.6m0 18.2h-33a4.3 4.3 0 1 0 0 8.6h33a4.3 4.3 0 1 0 0-8.6m-32.6 76.6a5 5 0 1 0-.2-9.9 5 5 0 0 0 .2 9.9m86.8-108a5 5 0 1 0-9.9 0 5 5 0 0 0 9.9 0M36.9 20.4a5 5 0 1 0-.2-9.9 5 5 0 0 0 .2 9.9m0-18.4a5 5 0 1 0-.2-9.8A5 5 0 0 0 37 2m37.5 111.8a9.1 9.1 0 1 1 0 18.3 9.1 9.1 0 0 1 0-18.3m0 26.9a17.8 17.8 0 1 0 0-35.6 17.8 17.8 0 0 0 0 35.6m72.8-100.3c-2.3 0-4.3 2-4.3 4.3a9.1 9.1 0 0 1-18.3 0 4.3 4.3 0 0 0-8.6 0 17.8 17.8 0 0 0 35.5 0c0-2.4-1.9-4.3-4.3-4.3M17 20.6c2.3 0 4.2-1.9 4.2-4.3V-3.6a4.3 4.3 0 0 0-8.6 0v20c0 2.3 2 4.2 4.3 4.2M77 69.5a4.3 4.3 0 0 0-4.3 4.2l-.2 18.4c0 2.4 1.9 4.3 4.3 4.4 2.4 0 4.3-2 4.3-4.3l.2-18.4c0-2.4-1.8-4.3-4.2-4.3M55.4 19.3a4.3 4.3 0 0 0 6 0l4.5-4.4 4.4 4.4a4.3 4.3 0 1 0 6.1-6L72 8.7l4.4-4.4a4.3 4.3 0 1 0-6-6.1l-4.5 4.4-4.4-4.4a4.3 4.3 0 0 0-6.1 6l4.4 4.5-4.4 4.4a4.3 4.3 0 0 0 0 6.1M13.3 129.8a4.3 4.3 0 0 0 6 0l4.5-4.4 4.5 4.4a4.3 4.3 0 1 0 6-6l-4.4-4.5 4.4-4.4a4.3 4.3 0 1 0-6-6.1l-4.5 4.4-4.4-4.4a4.3 4.3 0 0 0-6.1 6l4.4 4.5-4.4 4.4a4.3 4.3 0 0 0 0 6.1m30.7 7.7c-2.4 0-4.4 2-4.4 4.3V162a4.3 4.3 0 0 0 8.7 0v-20.2c0-2.3-2-4.3-4.4-4.3"}))),i.createElement("path",{d:"M113.6 216.4l-26-58.8 2-6-2-3.6 3.6-29.7 3-16.8H87l-2.2 7.2-8 3.4v-9.2l-17.1-.9 5.4 6.7c.5 2.5.5 3.6 0 3.4-.3-.2-2.8-1.4-7.6-4.7-.6-.3-1.3-2.3-2-5.9h-8l3.8 22.3 4.1 24.2-1.3 3.6 1.3 6v58.8h11.4l6.9-42.7 26.9 42.7h13z",fill:"#FFF"}),i.createElement("path",{fill:"#F1F2FA",d:"M56.5 157.7l31.3-.9 1.5-3.9-1.5-5.9 5.1-41 7.7-30.9h-4.5L85 107.7l-7.9 4.4-2.6 3.2-3.4 1.1-3.6-1.1-2.9-3.2-7.4-4.4-10.3-32.6h-4.1L55.2 147l-1 5.9z"}),i.createElement("path",{d:"M79.2 98c-4.2 1.5-6.4 2.7-6.6 3.8-.3 1.1-.4 6-.4 14.6l4.2-3.4v-5l1-6.2 2.5-3-.7-.7zm.8 57.8l45.1 95.4c2.8 2 3.5 1.4 2.1-1.8L87 155.8h-7z",fill:"#F1F2FA"}),i.createElement("path",{d:"M89.5 111.1c-1.3 4.8-3.8 16-7.5 33.3l1 9.4h5.6l-.8-6.7 4.3-33 7.8-38.5-1.1-1.2c-5.3 21.5-8.4 33.7-9.3 36.7z",fill:"#FFF"}),i.createElement("path",{d:"M73.2 174.8c0-.4 2.6 1.3 3 .6.7-1.1-.4-5.2-1-5.7-2-2-5.6-.3-6.3 2.8-1 4.3-4 29.2-8.9 75h2.2a3193 3193 0 0 0 11-72.7z",fill:"#F1F2FA"}),i.createElement("g",{transform:"translate(22)"},i.createElement("rect",{fill:"#FFF",x:"23.5",y:"12.4",width:"48.2",height:"59.6",rx:"5.6"}),i.createElement("path",{d:"M23.5 55V19.6c0-2.5.3-3.4.8-4.3a5 5 0 0 1 2.1-2.2c1-.5 1.8-.7 4.3-.7h27.4m3.9 0h2.6m4.3.7c.9.5 1.6 1.2 2 2.2.6.9.8 1.8.8 4.3v30.7M65 72H30.5",stroke:"#3B3E4D",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("rect",{fill:"#F2F3FA",x:"33.6",y:"23.6",width:"29.1",height:"4.5",rx:"1.1"}),i.createElement("rect",{fill:"#F2F3FA",x:"33.6",y:"32.6",width:"29.1",height:"2.3",rx:"1.1"}),i.createElement("rect",{fill:"#F2F3FA",x:"33.6",y:"39.4",width:"29.1",height:"2.3",rx:"1.1"}),i.createElement("rect",{fill:"#F2F3FA",x:"33.6",y:"46.1",width:"29.1",height:"2.3",rx:"1.1"}),i.createElement("path",{stroke:"#68DEC2",strokeWidth:"2.2",strokeLinecap:"round",d:"M53.8 62.8l2.7 2.5 8.5-7.9"}),i.createElement("path",{d:"M5 7.9a5 5 0 0 0 5 5 5 5 0 0 0-5 5v.1a5 5 0 0 0-5-5 5 5 0 0 0 5-5.1zm92 32.6a5 5 0 0 0 5 5 5 5 0 0 0-5 5.1 5 5 0 0 0-5-5 5 5 0 0 0 5-5z",stroke:"#3B3E4D",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("ellipse",{fill:"#3B3E4D",cx:"10.6",cy:"32.1",rx:"1.7",ry:"1.7"}),i.createElement("ellipse",{fill:"#3B3E4D",cx:"21.9",cy:"1.7",rx:"1.7",ry:"1.7"}),i.createElement("ellipse",{fill:"#3B3E4D",cx:"84.6",cy:"24.2",rx:"1.7",ry:"1.7"}),i.createElement("ellipse",{fill:"#3B3E4D",cx:"91.4",cy:"12.9",rx:"1.7",ry:"1.7"})),i.createElement("g",{stroke:"#3B3E4D",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"},i.createElement("path",{d:"M49 82.4l-2.7-8.3H42l8.5 46.8 4.5 25.8-1 5.5 1.9 4.4v90.7h6.2l11.1-75.6 30.1 48.7m23.7 26.9l-38.4-88.8-.7-1.9.9-4.4-.9-5.5 3.4-27.6"}),i.createElement("path",{d:"M99.2 79.4l1.3-5.3h-4.8l-10.9 34-8.4 3.7c-1 2.8-2.7 4.2-5.4 4.2s-4.6-1.4-5.8-4.2l-7.8-4.5m3.9 140.6v9H40.6v-.8c0-1 .8-2 1.8-2.2l10.5-2c2-.8 3-2.1 3-4m-20.3 9H67m34.7 0h43.8m-2.3 0v-.8c0-1.1-.8-2-1.8-2.2l-9.9-2a7 7 0 0 1-4.5-4.3m-70.1-90.8h21.3m-23.6-4.5h10.1"}),i.createElement("path",{d:"M60.7 83l3-2.2.6 2.2 3.1-3.5.5 2 3.7-2.8v2h2.2L72.4 85l2.9 3.5 3.5 2.2L78 93l2.4 5c-2.5 2.1-3.8 4-3.8 5.5v7.7m-11.3 1c0-4.2-1-7.1-3.5-8.8-1.9-1.3-4-3.3-5.3-5.8"}),i.createElement("path",{d:"M63.2 104.2c1.4-2.8 2-4.8 1.7-6-.3-1.6-1.1-1.6-1.4-1-.3.5-2.8-.7-1-2.4 1.8-1.7-1.7-3 .4-5 1.3-1.3 2.8-2.3 4.3-3M42 74.3c-.4-2.5-.6-4-.5-4.7.9-6 3.2-7.8 5-8.8 3-1.8 4 6 1.8 6m52.1 7.7c.6-2 .8-3.6.7-4.5a14 14 0 0 0-5.5-9.2c-3-1.8-4 6-1.8 6"})))))},c=function(e){var t=e.className,n=e.width,s=void 0===n?"15rem":n;return i.createElement("div",r.__assign({},o.classes(t,a.wrapper,a.everythingIsClear)),i.createElement("svg",{height:"100%",viewBox:"0 0 214 215",width:s},i.createElement("defs",null,i.createElement("rect",{id:"a",width:"141",height:"100",rx:"15"})),i.createElement("g",{fill:"none",fillRule:"evenodd"},i.createElement("path",{d:"M-14-59h272v288H-14z"}),i.createElement("g",{transform:"translate(53 14)"},i.createElement("mask",{id:"b",fill:"#fff"},i.createElement("use",{xlinkHref:"#a"})),i.createElement("use",{fill:"#68DEC2",xlinkHref:"#a"}),i.createElement("g",{mask:"url(#b)",fill:"#FFF",fillOpacity:".3"},i.createElement("path",{d:"M-64 140.8V91.1h17.1a4 4 0 0 0-.2 1.2v15a4 4 0 0 0 4 4H-27v29.5h-37zm37-40.1v2.6h-12V91.8l12 8.9zm6.4-5.3l-15.8-11.6a4 4 0 0 0-2.4-.8H-68a4 4 0 0 0-4 4v58a4 4 0 0 0 4 4h45a4 4 0 0 0 4-4V98.6a4 4 0 0 0-1.6-3.2zM177-15a4 4 0 0 0-5.6 1.5l-14.8 25.2-8.5-8.2a4 4 0 1 0-5.6 5.8L154.6 21a4 4 0 0 0 6.3-.8l17.4-29.6A4 4 0 0 0 177-15m-10 45.7h-57.2a4 4 0 0 0 0 8H167a4 4 0 0 0 0-8m-110.1 74H23.6a4 4 0 0 0 0 8.1H57a4 4 0 0 0 0-8m-.1 17.4H-.3a4 4 0 0 0 0 8H57a4 4 0 0 0 0-8M30.6 140H-.3a4 4 0 0 0 0 8h30.9a4 4 0 0 0 0-8M-8.8 46h-28.9a4 4 0 0 0 0 8h29a4 4 0 0 0 0-8m-58.4 8h12.4a4 4 0 0 0 0-8h-12.4a4 4 0 0 0 0 8M-10 64.2h-57a4 4 0 0 0 0 8h57a4 4 0 0 0 0-8m77-19.6a4.6 4.6 0 1 0-.2-9.2 4.6 4.6 0 0 0 .1 9.2m-56-24.3a4.6 4.6 0 1 0 .1 9.2 4.6 4.6 0 0 0-.1-9.2M-41.6-6.4a4.6 4.6 0 1 0-9.2 0 4.6 4.6 0 0 0 9.2 0M53 139.5a4.6 4.6 0 1 0 .2 9.2 4.6 4.6 0 0 0-.1-9.2M121-2.8a8.6 8.6 0 1 1 0 17.1 8.6 8.6 0 0 1 0-17m0 25a16.6 16.6 0 1 0 0-33.2 16.6 16.6 0 0 0 0 33.3M26.5-13.5a4 4 0 0 0-4-4 8.6 8.6 0 0 1 0-17 4 4 0 0 0 0-8.1 16.6 16.6 0 0 0 0 33.2 4 4 0 0 0 4-4m-62.4 51.6a4 4 0 0 0 0-8 8.6 8.6 0 0 1 0-17.1 4 4 0 0 0 0-8 16.6 16.6 0 0 0 0 33.1M91.8 51.6a4 4 0 0 0-4 4 8.6 8.6 0 0 1-17.1 0 4 4 0 1 0-8 0 16.6 16.6 0 0 0 33 0 4 4 0 0 0-4-4M11.1 35.2a4 4 0 0 0-4 4v24.6a4 4 0 1 0 8 0V39.3a4 4 0 0 0-4-4m17.4 32.5a4 4 0 0 0 4-4V20a4 4 0 1 0-8 0v43.7a4 4 0 0 0 4 4m17.3-73a4 4 0 0 0-4 4v65a4 4 0 1 0 8 0v-65a4 4 0 0 0-4-4m-71.4-1a4 4 0 0 0 5.7 0l4.1-4.1 4.2 4.1a4 4 0 0 0 5.7 0A4 4 0 0 0-6-12l-4.2-4.1 4.2-4.2a4 4 0 0 0-5.7-5.6l-4.2 4.1-4.1-4.1a4 4 0 1 0-5.7 5.6l4.2 4.2-4.2 4.1a4 4 0 0 0 0 5.7m.1 32.5a4 4 0 0 0 5.7 0l4.1-4.2 4.2 4.2a4 4 0 0 0 5.7 0 4 4 0 0 0 0-5.7l-4.2-4.2 4.2-4.1a4 4 0 0 0-5.7-5.7l-4.2 4.2-4.1-4.2a4 4 0 1 0-5.7 5.7l4.2 4.1-4.2 4.2a4 4 0 0 0 0 5.7m89.4-14a4 4 0 0 0 5.7 0L73.6 8l4.2 4.2a4 4 0 0 0 5.7 0 4 4 0 0 0 0-5.7l-4.2-4.1 4.2-4.2a4 4 0 0 0-5.7-5.7l-4.2 4.2-4.1-4.2a4 4 0 1 0-5.7 5.7l4.1 4.2-4.1 4.1a4 4 0 0 0 0 5.7m100.9 53l-13.3-8.8a4 4 0 0 0-4.4 0L135.8 64l-12.5-7.3a4 4 0 0 0-4.2.1l-12.9 8.5a4 4 0 0 0 4.5 6.7l10.7-7.1 12.5 7.3a4 4 0 0 0 4.3-.2l11-7.3 11 7.3a4 4 0 1 0 4.5-6.7M.6 94.5a4 4 0 0 0 2.2-.7l10.8-7.1L26 94a4 4 0 0 0 4.2-.2l11-7.3 11.1 7.3a4 4 0 1 0 4.5-6.7l-13.3-8.8a4 4 0 0 0-4.5 0l-11 7.5-12.5-7.3a4 4 0 0 0-4.3.1l-12.8 8.5a4 4 0 0 0 2.2 7.4m91.8-75.1a4 4 0 0 0-4 4v18.9a4 4 0 1 0 8 0V23.4a4 4 0 0 0-4-4"})),i.createElement("rect",{fill:"#7CA1FF",mask:"url(#b)",x:"-41",y:"-8",width:"69",height:"29",rx:"7"})),i.createElement("path",{d:"M145 215c49.4 0 53.7-1.3 53.7-3s-4.3-3-53.7-3c-49.3 0-89.3 1.3-89.3 3s40 3 89.3 3z",fill:"#F2F3FA"}),i.createElement("g",{transform:"translate(7 1)"},i.createElement("path",{d:"M74 13v12c0 3.1-.3 4.3-1 5.4-.5 1.2-1.4 2-2.6 2.7-1.1.6-2.3.9-5.4.9H46v-1.8c0-6.7.7-9 2-11.5s3.2-4.4 5.7-5.7c2.4-1.3 4.8-2 11.5-2H74z",fill:"#15C39A"}),i.createElement("rect",{fill:"#FFF",width:"69",height:"29",rx:"5"}),i.createElement("rect",{fill:"#F2F3FA",x:"2",y:"7",width:"19",height:"7",rx:"2"}),i.createElement("rect",{fill:"#F2F3FA",x:"29",y:"7",width:"19",height:"7",rx:"2"}),i.createElement("rect",{fill:"#FFF",x:"149",y:"45",width:"53",height:"74",rx:"5"}),i.createElement("path",{d:"M189.7 46h9.9c2.2 0 3 .2 3.8.7a4 4 0 0 1 2 1.9c.4.8.6 1.6.6 3.8v61.2c0 2.2-.2 3-.7 3.8a4 4 0 0 1-1.9 2c-.8.4-1.6.6-3.8.6h-32.1",stroke:"#3B3E4D",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("rect",{fill:"#F2F3FA",x:"160",y:"57",width:"32",height:"5",rx:"1"}),i.createElement("rect",{fill:"#F2F3FA",x:"160",y:"67",width:"32",height:"3",rx:"1"}),i.createElement("rect",{fill:"#F2F3FA",x:"160",y:"74",width:"32",height:"3",rx:"1"}),i.createElement("rect",{fill:"#F2F3FA",x:"160",y:"81",width:"32",height:"3",rx:"1"}),i.createElement("rect",{fill:"#F2F3FA",x:"160",y:"88",width:"32",height:"3",rx:"1"}),i.createElement("path",{d:"M100.1 114.1l-10-64.5-26-5.4L44 27.4l2.4-4.3 21.8 12.5L90 36.8l13.6 1.5 1-5.8-4.5-1.3V13l3.5-7.6 9.5-2.8 9.3 2.8 4.7 7.6h19.7l2.4 14.4 4 9.4 5.6 5.5 2 7.3-2 5.2c0 .7-1.9 1.8-5.6 3.5-5.7 2.6-14.3 1.5-21.2-1.2l24.6 37-3.4 3.5-26-33.8v19.1l12.3 31.2h-39.4z",fill:"#FFF"}),i.createElement("path",{d:"M65.6 43.3c-1-.9-1.3-4.3 4.3-2.8a224 224 0 0 1 15.9 5.1c3.2 1.3 4.8 2.7 4.8 4.3a217 217 0 0 1-25-6.6zM167.9 198l-36-103.5-5-11.8V64.2c1.1-2.3 2.2-2.9 3.3-1.7 11.5 12.6 21.1 28.3 24.4 32.8 1 1.4 1-.7 1.2-.8 1.3-.2-20.8-31.4-20.5-31.6 1-.8-2.1-3-2.3-3.5-2.4-6.2-12.6-10.2-14-8.5-1.9 2-.5 12.6 4 31.8l4 9.3 38 106h2.8zM105.2 5.1c-.8 1.5 2 7.6 6.1 8.8 2.8.8 5-.4 7-3.7V4l-3.5-.8h-5.3c-2.3.3-3.7 1-4.3 2z",fill:"#F1F2FA"}),i.createElement("path",{fill:"#A6ADC9",d:"M100.3 18.1v12.6l4 1.9v5.5l3.6 3 3.4.9h6.1l-1-3.9v-5.5l-3.8-.6-4.7-2-2-2v-2.7l1.3-1.6-.5-2-1.6-.7-2.2-1.4-1.6-1.5zM115 201c-2.8 1.8-2.6 3 .3 3.5 3 .5 4.2-.6 3.6-3.5h-4z"}),i.createElement("path",{d:"M118.3 111.6c0-.8 6.8-2 5.7-2.5-2.6-1.5-14.5-1.8-14.5 0 0 2.5 4.4 4.2 4.4 7.8 0 2.4 1.4 30.4 4.4 84.2h2.3l-2.3-89.5zm3.5-105.4c.7 6.7 2.8 9.6 6.3 8.9 5.3-1.1 9.5-2.1 11.2 1.6 1.6 3.8-6 15.6.9 20.5 6.7 5 18.8 12.5 8.5 21.7l10.3-4.8 1.7-4.4v-3.9l-1.7-3.5-2.3-2.3-4-3.6-3-6-1-10.2L146 10l-4.2-5.2-5.6-3.2H130l-5.8 1.7-2.4 3z",fill:"#F1F2FA"}),i.createElement("path",{d:"M161 198.5c-.1 2.2.5 3.6 2 4.1 2.2.7 7.1.6 6.6-.7a21 21 0 0 0-2.3-4l-6.2.6zM43.3 26.5c-4-.4-6.9-1-8.8-1.9-2-.8-3.3-1-4-.4-3.3-1.4-4-2.4-1.8-2.8 2-.5 6.5-1 13.3-1.7l4.7 3.4-3.4 3.4zm113.8 68.1c1.9.5 3.6 1.3 5 2.6 2.2 2 3.7 4.8 3.3 6-.4 1.1-2.3 6.8-6.6 4.3-2.9-1.8-3.7-3-2.4-3.9l-1.8 1.6-.8-5.4-.7-2.1 4-3z",fill:"#A6ADC9"})),i.createElement("path",{d:"M16.6 30H7.4c-2.2 0-3-.2-3.8-.7a4 4 0 0 1-2-1.9c-.4-.8-.6-1.6-.6-3.8V7.4c0-2.2.2-3 .7-3.8a4 4 0 0 1 1.9-2c.8-.4 1.6-.6 3.8-.6h53.7m18.4 0h7m4 0h2m-15 5h4m-61 24h3m77 181.3h41.4m30.2 0h20.3M168.2 101l4 5.6m-6.4-3.6l4.7 6.5m-59.4-76.2v6l-14.2-2-21.6-.4-21.8-13.3-3 4.6 21 16.4 25.4 5.8L120 202h7.6l-2.1-89.5m21.3 44.9l19.8 41.6h8.3a21825.3 21825.3 0 0 0-24.6-71A5945 5945 0 0 0 139 96c-2.4-6.7-3.9-8.8-5-13.3-.6-3-.6-8.9 0-17.5m25.5 33.2l4.1-2.9-18.2-28",stroke:"#3B3E4D",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M113 34l-4-1.4a3 3 0 0 1-2-2.8v-13c.2-8.7 4.2-13 12-13 2.6 0 4.9.4 6.8 1M104 88l19.4 2.3m6.1-85.6c-1.2-1-6.3-.5-4.2 6m3.5-3.9c2.7-3 6.1-4.5 10.3-4.5 6.3 0 13.5 4.4 15.6 13.7 2.1 9.2-.6 17.7 8.3 24.4 9 6.6 4.5 19-7.3 19.7m4.3 38.6l1 1.4v6.8a.3.3 0 0 0 .5.2l1.7-2.2 3.7 5.4M53.1 23.6L48.7 21l-15.6 1.3m17.6 5.2c-1.8 1-5.6-.3-7.5-1.5-1.2-.7-3-1.1-5.4-1.1M104 211.3c0-1.3.9-2.4 2.2-2.7l10.9-2.5c2-.7 3-2 3-4.1m-.8 2.8c1.6.7 3.1.9 4.6.5m44.1-6v7.4m20.6 4.7c.4-1.6-.5-3.3-2-4l-7.4-3.4a8 8 0 0 1-4.4-5",stroke:"#3B3E4D",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M107.1 14.8c0 2.4 1.7 6.4 5.3 7.1 2 .4 2.2 3 .9 3.7-1 .6-1.2 7.5 9.9 7.5m.5-3.5a35 35 0 0 0 2.2 17.4M111 39.5c2.2 1.8 4.4 3 6.6 3.3",stroke:"#3B3E4D",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{stroke:"#68DEC2",strokeWidth:"3",strokeLinecap:"round",d:"M189.8 109.1l2.8 2.9 9.1-9.1"}))))};t.StaticIllustration={NothingToCheck:s,NoIssuesFound:l,NothingToNoIssueFound:l,NoIssueFoundToNothingToCheck:s,EverythingIsClear:c}},1717:function(e,t){e.exports={fadeOut:"_583c1971-counter-fadeOut",circular:"_7212d7d8-counter-circular",loader:"_2d763cab-counter-loader",wrapper:"_631352e3-counter-wrapper",roundCounter:"_da2fd64c-counter-roundCounter _631352e3-counter-wrapper",ovalCounter:"_15923206-counter-ovalCounter _631352e3-counter-wrapper",flexCounter:"_d568b9a7-counter-flexCounter _631352e3-counter-wrapper",counterText:"_8bd9cd74-counter-counterText",red:"_6558f765-counter-red",green:"_43734c3d-counter-green",blue:"_768ed2ac-counter-blue",white:"_cdb2d4ce-counter-white",violet:"_e6c8242b-counter-violet",yellow:"_8bc19409-counter-yellow",gray:"_1c3e6139-counter-gray",meter:"_9e487fb4-counter-meter _631352e3-counter-wrapper",lensNavMeter:"_8d46e563-counter-lensNavMeter _9e487fb4-counter-meter _631352e3-counter-wrapper",plagiarismMeter:"_636dd268-counter-plagiarismMeter _631352e3-counter-wrapper",plagiarismIcon:"_66487ef1-counter-plagiarismIcon"}},1718:function(e,t){e.exports={flowPosition:"_c300c45e-flow_position-flowPosition",flowPositionAnimate:"_a526b12d-flow_position-flowPositionAnimate"}},1719:function(e,t){e.exports={wrapper:"_eca59f06-freemium-notification-wrapper",container:"_f21d7ac2-freemium-notification-container",messageContainer:"_c8da2383-freemium-notification-messageContainer",buttonsContainer:"_736759dd-freemium-notification-buttonsContainer",laterButton:"_17ccbab2-freemium-notification-laterButton",title:"_aaaa8f18-freemium-notification-title",imageContainer:"_215845fb-freemium-notification-imageContainer",image1:"_7d7ff4a7-freemium-notification-image1",image2:"_327bc006-freemium-notification-image2",image3:"_156f52d1-freemium-notification-image3",preload:"_fec511bf-freemium-notification-preload",plagiarismIcon:"_dd98f504-freemium-notification-plagiarismIcon",baseTitle:"_63a6a16a-freemium-notification-baseTitle"}},1720:function(e,t){e.exports={wrapper:"_4c81cf65-progress-wrapper",progress:"_8809be61-progress-progress"}},1721:function(e,t){e.exports={radialProgressBar:"_4ae20022-radial_progress_bar-radialProgressBar",progress:"_2c86c102-radial_progress_bar-progress",description:"_7b72251f-radial_progress_bar-description",circle:"_e31f9478-radial_progress_bar-circle",valueCircle:"_c0334d28-radial_progress_bar-valueCircle"}},1722:function(e,t){e.exports={scrolling:"_fcd0d243-scroller-scrolling",scrollWrap:"_002fadb3-scroller-scrollWrap",scroller:"_e361b4c6-scroller-scroller",scrollContent:"_ecf3ebb7-scroller-scrollContent",basicCard:"_725a3b65-scroller-basicCard",fakeCard:"_a849599e-scroller-fakeCard",card:"_e7d4e508-scroller-card _725a3b65-scroller-basicCard",cardAnimate:"_c22f2db6-scroller-cardAnimate",cardHidden:"_f9287ec6-scroller-cardHidden"}},1723:function(e,t){e.exports={path:"_fe66b082-spinner-path",dash:"_cf65428a-spinner-dash",red:"_14aaf1ef-spinner-red",green:"_81739936-spinner-green",blue:"_cfa84fa1-spinner-blue",white:"_e2d1e5f0-spinner-white",violet:"_84f818b3-spinner-violet",yellow:"_d7bc9a88-spinner-yellow",gray:"_4356b6cc-spinner-gray"}},1724:function(e,t){e.exports={base:"_f5b34f6c-upgrade-button-base",baseBig:"_bf0fff60-upgrade-button-baseBig _f5b34f6c-upgrade-button-base",baseSmall:"_758d9260-upgrade-button-baseSmall _f5b34f6c-upgrade-button-base",icon:"_383b0d06-upgrade-button-icon",bigIcon:"_bc4b93b7-upgrade-button-bigIcon _383b0d06-upgrade-button-icon",smallIcon:"_7a7468b4-upgrade-button-smallIcon _383b0d06-upgrade-button-icon",link:"_f4bfcf66-upgrade-button-link"}},1725:function(e,t){e.exports={mark:"_d3a6c9e6-view-model-mark"}},1726:function(e,t){e.exports={wrapper:"_fb8a6317-goals-wrapper",wrapperFree:"_fdcac938-goals-wrapperFree",row:"_58ce62af-goals-row",noBottomMargin:"_235a8f02-goals-noBottomMargin",rowHeader:"_5a39a1a1-goals-rowHeader",experimental:"_258550c6-goals-experimental",goalsTooltip:"_51e2cd0a-goals-goalsTooltip",infoIcon:"_21f716a8-goals-infoIcon",rowFree:"_a2dfb26d-goals-rowFree",freeBlock:"_be72154f-goals-freeBlock",select:"_b26c1722-goals-select",selectIcon:"_4ef8822e-goals-selectIcon",dropdownList:"_47d68139-goals-dropdownList",title:"_eb40ddf5-goals-title",description:"_96b0fb11-goals-description",image:"_d5ffb972-goals-image",hint:"_ca27b3e5-goals-hint",capitalize:"_09fb3e11-goals-capitalize",footerWrapper:"_a3e2dd1c-goals-footerWrapper",checkboxText:"_40ffa00f-goals-checkboxText"}},1727:function(e,t){e.exports={wrapper:"_d52f59d8-loader-wrapper",loader:"_2434e46e-loader-loader",loaderAnimation:"_7a719ce1-loader-loaderAnimation",loaderInitial:"_f4932052-loader-loaderInitial _2434e46e-loader-loader",loaderInitialAnimation:"_d7695d63-loader-loaderInitialAnimation",loader1:"_8d07b0c1-loader-loader1 _2434e46e-loader-loader",loader2:"_1502e572-loader-loader2 _2434e46e-loader-loader",lines:"_323b166e-loader-lines",empty:"_8b1e697a-loader-empty",titleWrap:"_85b746d0-loader-titleWrap",documentTitleWrap:"_2443845c-loader-documentTitleWrap",documentTitle:"_50e8c067-loader-documentTitle",documentLines:"_6eef73be-loader-documentLines",lensviewWrapper:"_34d91495-loader-lensviewWrapper",lensviewTitle:"_7dcc289b-loader-lensviewTitle",lensviewDescr:"_a3d41f93-loader-lensviewDescr",lensviewOpenCard:"_993bd95c-loader-lensviewOpenCard",lensviewLines:"_41e9cc90-loader-lensviewLines"}},1728:function(e,t){e.exports={firstTier:"_01b1a3e8-view-firstTier",firstTierLoader:"_f03899f1-view-firstTierLoader _01b1a3e8-view-firstTier",secondTier:"_44857ce2-view-secondTier",baseLoaderClass:"_7a7bbbfc-view-baseLoaderClass",textLoaderWrap:"_0c721226-view-textLoaderWrap",editor:"_ff9eeda6-view-editor",inlineCardWrapper:"_00a9d91f-view-inlineCardWrapper",invisible:"_1834f7d9-view-invisible"}},1729:function(e,t){e.exports={wrapper:"_c26b1fe0-navigation-wrapper",checkingWrapper:"_fcf1bc0a-navigation-checkingWrapper",dot:"_1a628b7f-navigation-dot",item:"_5574f932-navigation-item"}},1730:function(e,t){e.exports={wrapper:"_465d7896-search_bar-wrapper",view:"_74b26e92-search_bar-view",searchInputWrapper:"_4e1f00a3-search_bar-searchInputWrapper",searchInput:"_ed4184c3-search_bar-searchInput",searchIcon:"_cb4c3b3d-search_bar-searchIcon",counter:"_5f6a958e-search_bar-counter",closeButton:"_29a7c3c9-search_bar-closeButton",roundButton:"_1e667f20-search_bar-roundButton",lessIcon:"_7d524c27-search_bar-lessIcon",lessIconUp:"_aeab67ba-search_bar-lessIconUp _7d524c27-search_bar-lessIcon",overlayContentBase:"_6f9bf7c1-search_bar-overlayContentBase",overlayContent:"_5788fc91-search_bar-overlayContent _6f9bf7c1-search_bar-overlayContentBase",overlayContentFaded:"_79237372-search_bar-overlayContentFaded _6f9bf7c1-search_bar-overlayContentBase"}},1731:function(e,t){e.exports={header:"_78dbd0db-sidebar-header"}},1732:function(e,t){e.exports={wrapper:"_d1ef3993-new_toggler-wrapper",background:"_ee7b8ecc-new_toggler-background",mini:"_f264bd86-new_toggler-mini _d1ef3993-new_toggler-wrapper",full:"_b56c737d-new_toggler-full _d1ef3993-new_toggler-wrapper",fadeOut:"_46ec8d3f-new_toggler-fadeOut",reveal:"_56433d53-new_toggler-reveal",fadeIn:"_f0799383-new_toggler-fadeIn",labelReveal:"_b872bd70-new_toggler-labelReveal _56433d53-new_toggler-reveal",edgeBackground:"_da1c0cf6-new_toggler-edgeBackground _ee7b8ecc-new_toggler-background"}},1733:function(e,t){e.exports={issuesWrapper:"_c8dc64d0-new_toggler-issuesWrapper _44f85ed9-typography-header3",counterWrapper:"_24bff9a9-new_toggler-counterWrapper"}},1734:function(e,t){e.exports={issuesWrapper:"_56f7f837-new_toggler-issuesWrapper _44f85ed9-typography-header3",criticalCounter:"_a15f93c4-new_toggler-criticalCounter",advancedCounter:"_8df184ad-new_toggler-advancedCounter"}},1735:function(e,t){e.exports={wrapper:"_a34f9256-plagiarism-wrapper _98b130ea-card-fullCard",main:"_cceb3394-plagiarism-main",plagiarismTitle:"_51ca1618-plagiarism-plagiarismTitle _1cd6b501-typography-paper",titleUrl:"_0535599f-plagiarism-titleUrl _8d8a7136-typography-p2",titleBy:"_a5862886-plagiarism-titleBy",plagiarismP2:"_83a31e9b-plagiarism-plagiarismP2 _8d8a7136-typography-p2",percent:"_9a4b9b44-plagiarism-percent",ignoreButton:"_a0413cbf-plagiarism-ignoreButton",copyButton:"_c0064a6e-plagiarism-copyButton",textToCopy:"_07f78c92-plagiarism-textToCopy",referenceWrapper:"_327e5d41-plagiarism-referenceWrapper",referenceData:"_e1f8dfbd-plagiarism-referenceData _fb866abb-typography-small",copyableReference:"_66b3a88c-plagiarism-copyableReference",citationStyleSelect:"_9f20df4f-plagiarism-citationStyleSelect",citationStyleIcon:"_540607eb-plagiarism-citationStyleIcon",citationStyleDdlButton:"_d04ce7c6-plagiarism-citationStyleDdlButton",matchesContainer:"_88e5a13d-plagiarism-matchesContainer",matchesContainerLeft:"_6ac55641-plagiarism-matchesContainerLeft",matchesContainerRight:"_528f9510-plagiarism-matchesContainerRight",matchesIndex:"_1061f8ae-plagiarism-matchesIndex _e635cd19-typography-p1",matchesText:"_5202b474-plagiarism-matchesText _8d8a7136-typography-p2",matchesWordsCounter:"_7d95d4ea-plagiarism-matchesWordsCounter _fb866abb-typography-small",leftButton:"_562e6705-plagiarism-leftButton _44f85ed9-typography-header3",leftButtonIcon:"_a85ac869-plagiarism-leftButtonIcon",rightButtonIcon:"_7b72e5d5-plagiarism-rightButtonIcon _a85ac869-plagiarism-leftButtonIcon"}},1736:function(e,t){e.exports={text:"_a8fef03f-plagiarism-text",fullText:"_ebb19d34-plagiarism-fullText",dotPlagiarism:"_9e6d041f-plagiarism-dotPlagiarism",wrapper:"_2ed8ef31-plagiarism-wrapper",domain:"_39407fe9-plagiarism-domain",publication:"_a5805199-plagiarism-publication"}},1738:function(e,t){e.exports={wrapper:"_a702b44c-static-illustration-wrapper",everythingIsClear:"_b0487933-static-illustration-everythingIsClear",nothingToCheck:"_12ec9543-static-illustration-nothingToCheck",noIssuesFound:"_8c503925-static-illustration-noIssuesFound"}},1739:function(e,t){e.exports={toolbar:"_aa1b0107-synonyms-toolbar",scrollOnlyOnHover:"_ffe7fa44-synonyms-scrollOnlyOnHover",contentWrapper:"_05f7bd12-synonyms-contentWrapper",iconWrapper:"_34541e78-synonyms-iconWrapper",synonymsButton:"_d92b39e6-synonyms-synonymsButton",loader:"_43625484-synonyms-loader",rotation:"_b3a146c1-synonyms-rotation",synonymsPopupWrapper:"_b550bba8-synonyms-synonymsPopupWrapper",wrapper:"_34ba9b44-synonyms-wrapper",emptyResultWrapper:"_2a73980c-synonyms-emptyResultWrapper",activeWord:"_be8872d3-synonyms-activeWord",title:"_bf14bac1-synonyms-title",list:"_d8f290a4-synonyms-list",group:"_991bd7fa-synonyms-group _8d8a7136-typography-p2",groupTitle:"_d89542fb-synonyms-groupTitle",row:"_f395c9e1-synonyms-row _1cd6b501-typography-paper",item:"_2c9a4ee6-synonyms-item"}},1771:function(e,t,n){var r=n(1840);"string"==typeof r&&(r=[[e.i,r,""]]);n(1478)(r,{});r.locals&&(e.exports=r.locals)},1772:function(e,t,n){var r=n(1841);"string"==typeof r&&(r=[[e.i,r,""]]);n(1478)(r,{});r.locals&&(e.exports=r.locals)},1773:function(e,t,n){var r=n(1843);"string"==typeof r&&(r=[[e.i,r,""]]);n(1478)(r,{});r.locals&&(e.exports=r.locals)},1774:function(e,t,n){var r=n(1844);"string"==typeof r&&(r=[[e.i,r,""]]);n(1478)(r,{});r.locals&&(e.exports=r.locals)},1775:function(e,t,n){var r=n(1845);"string"==typeof r&&(r=[[e.i,r,""]]);n(1478)(r,{});r.locals&&(e.exports=r.locals)},1776:function(e,t,n){var r=n(1846);"string"==typeof r&&(r=[[e.i,r,""]]);n(1478)(r,{});r.locals&&(e.exports=r.locals)},1777:function(e,t,n){var r=n(1847);"string"==typeof r&&(r=[[e.i,r,""]]);n(1478)(r,{});r.locals&&(e.exports=r.locals)},1778:function(e,t,n){var r=n(1848);"string"==typeof r&&(r=[[e.i,r,""]]);n(1478)(r,{});r.locals&&(e.exports=r.locals)},1787:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(13),i=n(158);t.getUndoNotificationContent=function(e){switch(e.kind){case"ignore":return"Dismissed";case"ignoreAll":return r.createElement("div",null,r.createElement("span",null,e.alerts)," ",i.pluralize(e.alerts,"alert has been","alerts have been")," ","dismissed");case"replace":return"Corrected";case"replaceSynonym":return"Replaced";case"replaceTransform":return r.createElement("div",null,e.transform);case"addToDictionary":return r.createElement("div",null,r.createElement("b",null,e.word)," has been added to dictionary");case"report":return"Your report has been sent";case"markAsHelpful":return"Marked as “Will address”";case"markAsNotHelpful":return"Marked as “Not helpful”";default:return""}}},1788:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(13),i=n(7),o=n(1467),a=n(1542),s=n(1461),l=n(1481),c=n(1719),u=n(1543),d=n(122);!function(e){e.BaseNotification=function(e){var t=e.title,n=e.description,u=e.visible,d=e.children,p=e.upgradeViewModel,f=e.place;return r.createElement(i.F.div,{className:c.wrapper},r.createElement(l.Overlay,{visible:u,alignment:"none",overlayType:"transparent"}),u.view(function(e){return e&&r.createElement("div",{key:"container",className:c.container},r.createElement("div",{className:c.messageContainer},r.createElement(o.Paper,{className:c.baseTitle},t),r.createElement(o.P2,null,n),r.createElement("div",{className:c.buttonsContainer},r.createElement(a.UpgradeButton,{size:"small",upgradeViewModel:p,place:f}),r.createElement(s.Button.Flat,{name:"later",className:c.laterButton,onClick:function(){return u.set(!1)}},"maybe later"))),r.createElement("div",{className:c.imageContainer},d))}))},e.ProfessionalProofreaders=d.withContext(function(t,n){var i=t.visible,o=t.upgradeViewModel;return r.createElement("div",null,r.createElement(e.BaseNotification,{visible:i,upgradeViewModel:o,title:n.textResources.denali.proofitTitle,description:n.textResources.denali.proofitDescription,place:"editorDenaliProofit"},r.createElement(p,null)),r.createElement(u.PreloadWrapper,null,r.createElement(p,null)))}),e.Plagiarism=d.withContext(function(t,n){var i=t.visible,o=t.upgradeViewModel;return r.createElement(e.BaseNotification,{visible:i,upgradeViewModel:o,title:n.textResources.denali.plagiarism.title,description:n.textResources.denali.plagiarism.description,place:"editorDenaliPlagiarism"},r.createElement(f,null))})}(t.Freemium||(t.Freemium={}));var p=function(){return r.createElement("picture",null,r.createElement("div",{className:c.image1}),r.createElement("div",{className:c.image2}),r.createElement("div",{className:c.image3}))},f=function(){return r.createElement("svg",{width:"49",height:"61",viewBox:"0 0 49 61",className:c.plagiarismIcon},r.createElement("g",{fill:"none",fillRule:"evenodd"},r.createElement("path",{d:"M4.692 14.29c0-1.73 1.402-3.136 3.13-3.136h37.745c1.728 0 3.197 1.41 3.264 3.134 0 0 .447 6.995-.134 16.423-.383 6.222-.94 9.332-7.02 17.072-4.657 5.925-10.963 10.785-13.665 12.74-.826.597-1.77.64-2.55.103-4.638-3.192-20.768-15.34-20.768-29.914V14.29z",fill:"#A4D3FF",opacity:".746"}),r.createElement("path",{d:"M1 7.462h43.385v19.743c0 16.704-21.693 31.026-21.693 31.026S1 44.388 1 27.206V7.462z",stroke:"#8189A9",strokeWidth:"1.568",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("g",{style:{mixBlendMode:"multiply"},strokeWidth:"1.568",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{stroke:"#E9EEF4",fill:"#E9EEF4",d:"M35.727 3.99l6.628 3.826L15.782 53.84l-7.6 5.51.973-9.336z"}),r.createElement("path",{d:"M32.81 9.776l9.853 5.69-9.46 16.384-1.267-.732c-1.125-.65-1.514-2.08-.858-3.216l.985-1.706c.65-1.127 2.094-1.512 3.01-.984",stroke:"#F3F5FA",fill:"#F3F5FA"})),r.createElement("g",{stroke:"#8189A9"},r.createElement("path",{strokeWidth:"1.568",fill:"#FFF",strokeLinecap:"round",strokeLinejoin:"round",d:"M33.25 1.05l6.937 4.006L13.61 51.09l-7.756 5.423.818-9.428z"}),r.createElement("path",{strokeWidth:"1.568",fill:"#E9EEF4",strokeLinecap:"round",strokeLinejoin:"round",d:"M33.25 1.05l6.937 4.006-3.235 5.604-6.937-4.005z"}),r.createElement("path",{d:"M30.347 6.848l10.314 5.954L31.2 29.19l-1.428-.823c-1.12-.648-1.51-2.077-.853-3.214l.985-1.707c.65-1.127 2.09-1.513 3.094-.934",strokeWidth:"1.725",strokeLinecap:"square"}))))}},1789:function(e,t,n){"use strict";function r(e){var t=e.title,n=e.children,r=e.theme,i=void 0===r?{}:r;return t&&n?o.createElement("div",null,o.createElement(d.P1,{className:i.header},t),o.createElement(d.P2,{className:f.description},n)):t?o.createElement(d.P1,{className:f.description},t):o.createElement(d.P2,{className:f.description},n)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(13),a=n(7),s=n(122),l=n(36),c=n(1461),u=n(573),d=n(1467),p=n(1547),f=n(1556),h=function(e){var t=e.source,n=e.theme,r=e.linkText;return o.createElement(c.Button,{name:"reload-page",className:n.link,onClick:function(){try{localStorage.setItem("pageReloadReason",JSON.stringify({source:t,location:window.location.href,timestamp:Date.now()}))}catch(e){}window.location.reload()}},r)};t.Notification=r,function(e){e.Error=s.withContext(function(t,n){var r=t.theme,a=n.appConfig;return o.createElement(e,i.__assign({title:"Sorry, Something Went Wrong"},{theme:r}),"Please try again later or"," ",o.createElement(c.Button,{name:"support",className:r.link,href:a.support.login,target:"_blank"},"contact support")," ","now to report the issue.")}),e.UnauthorizedError=s.withContext(function(t,n){var r=t.theme,a=n.appConfig;return o.createElement(e,i.__assign({title:"You've Been Logged Out"},{theme:r}),"This occurs due to inactivity or logging out on another device.",o.createElement("br",null),o.createElement(c.Button,{name:"login",className:r.link,href:a.funnel.signin},"Log Back In"))}),e.Offline=function(t){var n=t.reconnect,r=t.reconnectTime,s=t.theme;return o.createElement(e,i.__assign({title:"Lost Connection"},{theme:s}),"Your Internet session was interrupted. We’ll try to reconnect you in"," ",o.createElement(a.F.span,null,r.view(function(e){return e}))," seconds.",o.createElement("br",null),o.createElement(c.Button,{name:"reconnect",className:s.link,onClick:n},"Reconnect Now"))},e.SlowNetworkError=function(t){var n=t.theme;return o.createElement(e,i.__assign({title:"Your Internet Connection Is Unstable"},{theme:n}),"Grammarly may work slower than normal.")},e.ServerError=function(t){var n=t.theme;return o.createElement(e,i.__assign({title:"Sorry, Unexpected Issue"},{theme:n}),"A small error has occurred, causing an interruption of service.",o.createElement("br",null),o.createElement(h,i.__assign({source:"UnknownConnectionError",linkText:"Reload This Page"},{theme:n})))},e.ConnectionWSError=s.withContext(function(t,n){var r=t.theme,a=n.appConfig;return o.createElement(e,i.__assign({title:"Can’t Connect to Grammarly"},{theme:r}),"Your network configuration currently blocks Grammarly services on this computer. ",o.createElement("br",null),o.createElement(c.Button,{name:"troubleshoot",className:r.link,href:a.support.diagnosticTestPath,target:"_blank"},"Troubleshoot This Issue"))}),e.ClientConnectionError=function(t){var n=t.theme;return o.createElement(e,i.__assign({title:"Your Internet Connection Is Unstable"},{theme:n}),"Please check your network stability and then reload this page.",o.createElement("br",null),o.createElement(h,i.__assign({source:"ClientConnectionErrorNotification",linkText:"Reload Page Now"},{theme:n})),".")},e.CheckingIsDownError=function(t){var n=t.theme;return o.createElement(e,i.__assign({title:"Text Checking Is Temporarily Unavailable"},{theme:n}),"Grammarly is unable to check your text for errors at this time. We’re working to resolve the issue. Please check back soon.")},e.CopyToClipboardError=function(t){var n=t.theme;return o.createElement(e,i.__assign({title:"Copying Is Not Supported by Your Browser"},{theme:n}),"Please use ",l.hotkeyLabel("C",l.getBrowserInfo().os)," instead.")},e.Undo=function(t){var n=t.action,r=t.classes,i=t.content;return o.createElement(e,null,o.createElement("div",{className:r.wrapper},o.createElement("div",{className:r.content},i),o.createElement(c.Button,{name:"alertUndoButton",className:r.button,onClick:n},o.createElement(u.Icon.Undo,{className:r.icon}),"UNDO")))},e.ProofitPaymentDeclinedError=s.withContext(function(t,n){var r=t.errorMessage,a=t.theme,s=n.appRouter;return o.createElement(e,i.__assign({title:"Order can not be processed"},{theme:a}),o.createElement("div",null,r),"Please update your credit card information in the Manage Subscription section.",o.createElement("br",null),o.createElement(c.Button,{name:"manage-subscription",className:a.link,onClick:function(){return s.navigate(p.subscriptionRoutes.manage.href({}))}},"Go to Manage Subscription"))}),e.ProofitEmptyDocumentError=function(t){var n=t.theme;return o.createElement(e,i.__assign({title:"Document is empty"},{theme:n}),"The document you are trying to submit is empty. Please write something and try again.")},e.ProofitDocumentProofreadError=function(t){var n=t.theme,r=t.navigateToDocuments;return o.createElement(e,i.__assign({title:"This document is already corrected"},{theme:n}),"The text you are trying to submit is already corrected by our proofreaders. Please edit your text or choose another document.",o.createElement("br",null),o.createElement(c.Button,{name:"goto-docs",className:n.link,onClick:r},"Go to your documents"))},e.ProofitCancelled=s.withContext(function(t,n){var r=t.theme,a=n.appConfig;return o.createElement(e,i.__assign({title:"Your order has been cancelled"},{theme:r}),"Your proofreading order has been cancelled and the payment refunded. Please check your email for more information, or contact"," ",o.createElement(c.Button,{name:"support",className:r.link,href:a.support.login,target:"_blank"},"Grammarly support"),".")}),e.ProofitCompleted=function(t){var n=t.theme,r=t.documentTitle,a=t.documentDownloadUrl,s=t.email;return o.createElement(e,i.__assign({title:(r||"Your")+" document has been proofread"},{theme:n}),"A version of this document with proofreaders’ marks has been emailed to you at ",s," in .docx format.",o.createElement("br",null),o.createElement(c.Button,{name:"download",className:n.link,href:a,target:"_blank"},"Download .docx"))},e.DenaliDocumentUploadedNotification=s.withContext(function(t,n){var r=t.navigateToDocuments,a=t.theme,s=n.textResources;return o.createElement(e,i.__assign({title:s.denali.uploadNotificationTitle},{theme:a}),"Don’t worry! The previous document has been saved to"," ",o.createElement(c.Button,{name:"goto-docs",className:a.link,onClick:r},"My documents"))}),e.DocumentNotFoundError=function(t){var n=t.theme,r=t.navigateToDocuments;return o.createElement(e,i.__assign({title:"Can’t find this document"},{theme:n}),"It looks like this document was removed or URL is incorrect.",o.createElement("br",null),o.createElement(c.Button,{name:"goto-docs",className:n.link,onClick:r},"Go to your documents"))},e.AlertsNothingFound=function(){return o.createElement(e,null,"Grammarly found no critical writing issues in this text. Keep up the great work!")},e.BlobDownloadUnsupportedNotification=s.withContext(function(t,n){var r=t.theme,a=n.appConfig;return o.createElement(e,i.__assign({},{theme:r}),"The file cannot be downloaded because this browser does not support safe downloads.",o.createElement("br",null),"Please update your browser and try again."," ",o.createElement(c.Button,{name:"support",className:f.link,href:a.support.safariDownloadFilesKBUrl,target:"_blank"},"Learn more"))}),e.SelfUpdateNotification=s.withContext(function(t){var n=t.theme;return o.createElement(e,i.__assign({title:"Grammarly needs to refresh this page"},{theme:n}),"Don't worry - your documents have already been saved. Please"," ",o.createElement(h,i.__assign({source:"SelfUpdateBlocker",linkText:"reload"},{theme:n}))," the page (",l.hotkeyLabel("R",l.getBrowserInfo().os),").")})}(r=t.Notification||(t.Notification={}))},1790:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(158);t.getPaymentErrorText=function(e,t){switch(e){case"creditCard":return"Your card ••••"+r.nbsp+t.map(function(e){return e}).orNull()+" has been declined.";case"payPal":return"Your PayPal account has been declined";default:throw new Error("unknown payment method: "+e)}}},1791:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(2),o=n(6),a=n(7),s=n(23),l=n(54),c=n(157),u=n(43),d=n(320);!function(e){e.Querying="querying",e.SynonymsReady="ready",e.SynonymsEmpty="empty",e.SynonymsError="error",e.SynonymsNone="none"}(r=t.SynonymsStateKind||(t.SynonymsStateKind={}));var p;!function(e){function t(e){return null!==e&&e.kind===r.SynonymsReady}function n(e){return null!==e&&e.kind===r.SynonymsEmpty}function i(e){return null!==e&&e.kind===r.Querying}e.isReady=t,e.isEmpty=n,e.isQuerying=i,e.defaultState={kind:r.SynonymsNone,query:{id:-1,start:-1,word:""}}}(p=t.SynonymsModel||(t.SynonymsModel={}));var f=function(){function e(e,t){this.positionManager=e,this._capiClient=t,this.state=a.Atom.create(p.defaultState),this.changes=new s.Subject,this._log=o.Monitoring.Logging.getLogger("editor.SynonymsModelImpl")}return e.prototype.query=function(e){return i.__awaiter(this,void 0,void 0,function(){var t,n=this;return i.__generator(this,function(i){switch(i.label){case 0:return this._log.trace("SynonymsQuery: "+e.word),this.state.set({kind:r.Querying,query:e}),t=u.retryCountPredicate(2),[4,u.promiseRetrier(function(){return n._capiClient.requestSynonyms(e.start,e.word)},function(e){return t()&&d.DroppedFromQueueError.isDroppedFromQueueError(e)}).then(function(t){var i=t.map(function(t){return{kind:r.SynonymsReady,query:e,synonyms:t}}),o=i.getOrElse({kind:r.SynonymsEmpty,query:e});return n._onResponse(o),o}).catch(function(t){return n.abortQuery(),t.message&&-1!==t.message.indexOf("Timeout")?n._log.info("Synonyms timeout",t):n._log.warn("Error getting synonyms",t),{kind:r.SynonymsError,query:e}})];case 1:return[2,i.sent()]}})})},e.prototype.abortQuery=function(){var e=this.state.get();p.isQuerying(e)&&this.state.set(p.defaultState)},e.prototype._onResponse=function(e){var t=this,n=window.SQT;setTimeout(function(){t._log.trace("_onResponse() newState: "+e);var n=t.state.get();p.isQuerying(n)&&n.query.word===e.query.word?t.state.set(e):t._log.trace("Discarding result for "+e.query.word)},n)},e.prototype.applySynonym=function(e,t){var n=this;this._log.debug("_applySynonym(#"+e.id+")");var r=e.range,i=r.start,o=r.end-r.start,a=this.positionManager.getTextLength(),s=c.Change.delta((new c.Delta).retain(i).delete(o).insert(t),a);return this.changes.next(s),this._capiClient.accept(e.id,i,t),a=this.positionManager.getTextLength(),{action:l.CAPI.FeedbackType.SYNONYM_ACCEPTED,replacement:t,commit:function(){n._log.debug("_applySynonym(#"+e.id+"):commit()"),e.dispose()},undo:function(){n._log.debug("_applySynonym(#"+e.id+"):undo()");var r=n.positionManager.getTextLength();r!==a&&n._log.error("Text has changed while uncommitted apply is present");var o=c.Change.delta((new c.Delta).retain(i).delete(t.length).insert(e.range.value),r);return n.changes.next(o),e.dispose(),[]}}},e}();t.SynonymsModelImpl=f},1792:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(13),i=n(209),o=n(1699),a=n(1558);t.PDFReportContent=function(e){var t=e.model;return r.createElement("div",{className:a.content},r.createElement("div",{className:a.separatorRemover}),r.createElement(o.TitleSection,{title:t.title,author:t.author}),r.createElement(o.GeneralMetricsSection,{stats:t.stats}),r.createElement(o.ScoreSection,{score:t.score,critical:t.criticalIssues,advanced:t.advancedIssues}),t.plagiarism.map(function(e){return r.createElement(o.PlagiarismSection,{plagiarismData:e})}).orNull(),!i.isEmptyObject(t.issues)&&r.createElement(o.WritingIssuesSection,{issues:t.issues}),r.createElement(o.DocumentInsightsSection,{stats:t.stats}))},t.PDFReportHeader=function(e){var t=e.title;return r.createElement("div",{style:{width:"100%",marginLeft:"17.4857px",marginRight:"38.4686px",fontFamily:"Akkurat Std",color:"#becafa",letterSpacing:"0.1px",position:"absolute",top:0}},r.createElement("div",{style:{width:"144px",position:"absolute",top:"15.7351px",left:0}},r.createElement("svg",{width:"83.5px",viewBox:"0 0 93 23"},r.createElement("path",{d:"M32.1137999,10.3020362 L32.1137999,10.2761929 C32.1137999,9.3346607 31.3716092,8.67717134 30.4082654,8.67717134 C29.4453916,8.67717134 28.7163619,9.3346607 28.7163619,10.2761929 L28.7163619,10.3020362 C28.7163619,11.2561408 29.4453916,11.9010577 30.4082654,11.9010577 C31.3716092,11.9010577 32.1137999,11.2433355 32.1137999,10.3020362 Z M27.6230525,15.7046709 C27.2846248,15.5761532 27.0632367,15.3053812 27.0632367,14.9440414 C27.0632367,14.5056376 27.4275165,14.1447634 27.8702927,14.1447634 C28.0004933,14.1447634 28.1046069,14.170141 28.1955593,14.2092551 C28.7683012,14.4669891 29.3802912,14.6215829 30.1222469,14.6215829 C31.4757227,14.6215829 32.1137999,13.9771316 32.1137999,12.7389841 L32.1137999,12.4037204 C31.527897,13.1003239 30.8902898,13.5256897 29.8357585,13.5256897 C28.2087204,13.5256897 26.7375,12.352034 26.7375,10.3020362 L26.7375,10.2761929 C26.7375,8.21315707 28.2345725,7.05253935 29.8357585,7.05253935 C30.9159069,7.05253935 31.5539841,7.50398123 32.0874778,8.08394085 L32.0874778,8.07113564 C32.0874778,7.54239686 32.530019,7.10399301 33.0766737,7.10399301 C33.6233284,7.10399301 34.0658696,7.54239686 34.0658696,8.08394085 L34.0658696,12.5327038 C34.0658696,13.7708513 33.7666901,14.6732694 33.1807872,15.2536947 C32.530019,15.8983788 31.527897,16.1821889 30.1744212,16.1821889 C29.2498556,16.1821889 28.4430346,16.0273622 27.6230525,15.7046709 Z M35.5315436,8.05210654 C35.5315436,7.49972039 35.9859169,7.05253935 36.5476701,7.05253935 C37.1089407,7.05253935 37.5633141,7.49972039 37.5633141,8.05210654 L37.5633141,8.36772184 C37.8574624,7.68400743 38.3383791,7.05253935 38.9399473,7.05253935 C39.5680588,7.05253935 39.9285653,7.46053565 39.9285653,8.02574589 C39.9285653,8.55200888 39.5810891,8.8673867 39.1670133,8.9597677 C38.1380977,9.19677603 37.5633141,9.97263396 37.5633141,11.3927841 L37.5633141,13.2608277 C37.5633141,13.8129763 37.1089407,14.2601574 36.5476701,14.2601574 C35.9859169,14.2601574 35.5315436,13.8129763 35.5315436,13.2608277 L35.5315436,8.05210654 Z M39.9285653,12.118996 L39.9285653,12.092591 C39.9285653,10.5651097 41.0750287,9.85971938 42.7113383,9.85971938 C43.406799,9.85971938 43.9094379,9.97736302 44.3988189,10.1471094 L44.3988189,10.0294657 C44.3988189,9.20690326 43.8964126,8.75000271 42.917418,8.75000271 C42.3764007,8.75000271 41.9384233,8.82827463 41.5648749,8.94591827 C41.4488097,8.98505423 41.3713554,8.99825672 41.281341,8.99825672 C40.8303382,8.99825672 40.4695825,8.64556156 40.4695825,8.18842524 C40.4695825,7.8362016 40.6884549,7.53560913 40.997807,7.41796549 C41.6162785,7.18291396 42.2859211,7.05253935 43.2009519,7.05253935 C44.269961,7.05253935 45.042876,7.33992932 45.532257,7.8362016 C46.0476887,8.35817158 46.279819,9.1288671 46.279819,10.0690732 L46.279819,13.2546461 C46.279819,13.7902901 45.8546344,14.2078189 45.3264099,14.2078189 C44.759342,14.2078189 44.3857936,13.8034926 44.3857936,13.3854922 L44.3857936,13.3722897 C43.9094379,13.9079337 43.2523555,14.2601574 42.2989464,14.2601574 C40.997807,14.2601574 39.9285653,13.5029001 39.9285653,12.118996 Z M47.256935,8.09698499 C47.256935,7.54859209 47.7036529,7.10464375 48.2557042,7.10464375 C48.8075183,7.10464375 49.2542362,7.54859209 49.2542362,8.09698499 L49.2542362,8.17549524 C49.713765,7.58772933 50.318483,7.05253935 51.3303003,7.05253935 C52.2498323,7.05253935 52.9463611,7.45711468 53.314079,8.16252808 C53.9316078,7.44414752 54.6675181,7.05253935 55.626906,7.05253935 C57.1117745,7.05253935 58.0052104,7.94043603 58.0052104,9.62498776 L58.0052104,13.2680519 C58.0052104,13.816209 57.5584925,14.2601574 57.0062039,14.2601574 C56.4543898,14.2601574 56.0076719,13.816209 56.0076719,13.2680519 L56.0076719,10.2778252 C56.0076719,9.33758838 55.5875246,8.85426703 54.838329,8.85426703 C54.0893707,8.85426703 53.6298419,9.33758838 53.6298419,10.2778252 L53.6298419,13.2680519 C53.6298419,13.816209 53.183124,14.2601574 52.6308354,14.2601574 C52.0790214,14.2601574 51.6323034,13.816209 51.6323034,13.2680519 L51.6323034,10.2778252 C51.6323034,9.33758838 51.2119188,8.85426703 50.4629605,8.85426703 C49.713765,8.85426703 49.2542362,9.33758838 49.2542362,10.2778252 L49.2542362,13.2680519 C49.2542362,13.816209 48.8075183,14.2601574 48.2557042,14.2601574 C47.7036529,14.2601574 47.256935,13.816209 47.256935,13.2680519 L47.256935,8.09698499 Z M59.4708843,8.09698499 C59.4708843,7.54859209 59.9176023,7.10464375 60.4696536,7.10464375 C61.0214677,7.10464375 61.4681856,7.54859209 61.4681856,8.09698499 L61.4681856,8.17549524 C61.9277144,7.58772933 62.5326696,7.05253935 63.5442497,7.05253935 C64.4637816,7.05253935 65.1603105,7.45711468 65.5280284,8.16252808 C66.1457945,7.44414752 66.8814675,7.05253935 67.8408553,7.05253935 C69.3257239,7.05253935 70.2191598,7.94043603 70.2191598,9.62498776 L70.2191598,13.2680519 C70.2191598,13.816209 69.7724419,14.2601574 69.2201533,14.2601574 C68.6685765,14.2601574 68.2218585,13.816209 68.2218585,13.2680519 L68.2218585,10.2778252 C68.2218585,9.33758838 67.8014739,8.85426703 67.0522784,8.85426703 C66.3033201,8.85426703 65.8437913,9.33758838 65.8437913,10.2778252 L65.8437913,13.2680519 C65.8437913,13.816209 65.3970734,14.2601574 64.8447848,14.2601574 C64.2929707,14.2601574 63.8462528,13.816209 63.8462528,13.2680519 L63.8462528,10.2778252 C63.8462528,9.33758838 63.4261055,8.85426703 62.6769099,8.85426703 C61.9277144,8.85426703 61.4681856,9.33758838 61.4681856,10.2778252 L61.4681856,13.2680519 C61.4681856,13.816209 61.0214677,14.2601574 60.4696536,14.2601574 C59.9176023,14.2601574 59.4708843,13.816209 59.4708843,13.2680519 L59.4708843,8.09698499 Z M70.7077178,12.118996 L70.7077178,12.092591 C70.7077178,10.5651097 71.8542231,9.85971938 73.4903601,9.85971938 C74.1863114,9.85971938 74.6882709,9.97736302 75.1779025,10.1471094 L75.1779025,10.0294657 C75.1779025,9.20690326 74.6757103,8.75000271 73.6964472,8.75000271 C73.1554102,8.75000271 72.7174168,8.82827463 72.3438547,8.94591827 C72.2277853,8.98505423 72.1507933,8.99825672 72.0603103,8.99825672 C71.6092911,8.99825672 71.2487548,8.64556156 71.2487548,8.18842524 C71.2487548,7.8362016 71.4678678,7.53560913 71.776766,7.41796549 C72.3952602,7.18291396 73.0653925,7.05253935 73.979759,7.05253935 C75.0492724,7.05253935 75.8222157,7.33992932 76.3118472,7.8362016 C76.8268326,8.35817158 77.0589714,9.1288671 77.0589714,10.0690732 L77.0589714,13.2546461 C77.0589714,13.7902901 76.6337712,14.2078189 76.10576,14.2078189 C75.538904,14.2078189 75.1653418,13.8034926 75.1653418,13.3854922 L75.1653418,13.3722897 C74.6882709,13.9079337 74.0313971,14.2601574 73.0781857,14.2601574 C71.776766,14.2601574 70.7077178,13.5029001 70.7077178,12.118996 Z M78.5246454,8.05210654 C78.5246454,7.49972039 78.9792601,7.05253935 79.540772,7.05253935 C80.1020425,7.05253935 80.5564159,7.49972039 80.5564159,8.05210654 L80.5564159,8.36772184 C80.8505642,7.68400743 81.3314809,7.05253935 81.9330491,7.05253935 C82.5611606,7.05253935 82.9216671,7.46053565 82.9216671,8.02574589 C82.9216671,8.55200888 82.5741909,8.8673867 82.1603564,8.9597677 C81.1311995,9.19677603 80.5564159,9.97263396 80.5564159,11.3927841 L80.5564159,13.2608277 C80.5564159,13.8129763 80.1020425,14.2601574 79.540772,14.2601574 C78.9792601,14.2601574 78.5246454,13.8129763 78.5246454,13.2608277 L78.5246454,8.05210654 Z M86.930076,16.0926159 C86.6386162,15.9887322 86.293794,15.7541713 86.293794,15.2728277 C86.293794,14.7907791 86.6780997,14.4654962 87.0892063,14.4654962 C87.2480973,14.4654962 87.3407039,14.4915846 87.4203887,14.517438 C87.5926802,14.5696149 87.6986873,14.5957033 87.8446565,14.5957033 C88.2024006,14.5957033 88.374692,14.5305997 88.5601447,14.1789933 L88.6266683,14.0229327 L86.2011873,8.50346419 C86.1483034,8.37349204 86.0951802,8.17794623 86.0951802,8.0482091 C86.0951802,7.48836521 86.5326091,7.09774365 87.0892063,7.09774365 C87.5926802,7.09774365 87.8843792,7.37108473 88.0566707,7.83950155 L89.5941327,11.9010727 L91.0782323,7.85266329 C91.2376019,7.43618832 91.5288223,7.09774365 92.0456967,7.09774365 C92.5628104,7.09774365 93,7.48836521 93,8.00872389 C93,8.16525455 92.9468768,8.38665378 92.9073933,8.47761078 L90.4290285,14.3223623 C89.8324693,15.7412445 89.2361494,16.275 88.0298698,16.275 C87.5792798,16.275 87.2614977,16.2098964 86.930076,16.0926159 Z M83.4102251,5.63428404 C83.4102251,5.09034375 83.8474903,4.65 84.387109,4.65 C84.9274239,4.65 85.364457,5.09034375 85.364457,5.63428404 L85.364457,13.2761072 C85.364457,13.8198136 84.9274239,14.2601574 84.387109,14.2601574 C83.8474903,14.2601574 83.4102251,13.8198136 83.4102251,13.2761072 L83.4102251,5.63428404 Z M44.4248696,11.6618596 L44.4248696,11.3091645 C44.0896995,11.1526206 43.6517221,11.0481795 43.1749012,11.0481795 C42.3373247,11.0481795 41.8223582,11.3876722 41.8223582,12.0145548 L41.8223582,12.0404883 C41.8223582,12.5761323 42.2603356,12.88922 42.8913673,12.88922 C43.8063981,12.88922 44.4248696,12.379981 44.4248696,11.6618596 Z M75.2037215,11.6618596 L75.2037215,11.3091645 C74.8687717,11.1526206 74.4307782,11.0481795 73.9544051,11.0481795 C73.1167979,11.0481795 72.6013474,11.3876722 72.6013474,12.0145548 L72.6013474,12.0404883 C72.6013474,12.5761323 73.0393408,12.88922 73.6708608,12.88922 C74.5854599,12.88922 75.2037215,12.379981 75.2037215,11.6618596 Z",fill:"#2B2D38"}),r.createElement("path",{d:"M22.0875,11.04375 C22.0875,17.1430211 17.1430211,22.0875 11.04375,22.0875 C4.94447894,22.0875 0,17.1430211 0,11.04375 C0,4.94447894 4.94447894,0 11.04375,0 C17.1430211,0 22.0875,4.94447894 22.0875,11.04375 Z M13.08629,12.2595253 C12.6265316,12.2595253 12.2634378,12.6652216 12.3492818,13.1315014 C12.4146868,13.4862794 12.7551774,13.72932 13.1230803,13.72932 L14.2820947,13.72932 L14.9536979,13.6369127 C13.8790847,15.1833207 12.0128791,15.8947626 9.9720999,15.5805306 C8.31100614,15.3247604 6.88387942,14.2231805 6.28200946,12.684316 C4.91523805,9.19122567 7.51749002,5.8563121 10.9086894,5.8563121 C12.6758257,5.8563121 14.2253463,6.86996364 15.1140844,8.09483187 L15.1143248,8.09483187 C15.1145653,8.09483187 15.1148058,8.12076249 15.1152867,8.12123396 C15.3509369,8.45479604 15.8181496,8.55026787 16.1583997,8.31924961 C16.4820581,8.0993108 16.5710281,7.68206354 16.3764964,7.35392332 L16.381546,7.35392332 C15.1523174,5.47301038 12.9436975,4.26912238 10.4599921,4.43224956 C7.22581273,4.64488065 4.60817136,7.23959285 4.42253668,10.4120864 C4.20636365,14.1034282 7.19335071,17.1175092 10.9086894,17.1175092 C12.8600177,17.1175092 14.6069554,16.2844291 15.7974701,14.9365083 L15.6565609,15.7094765 L15.6565609,16.4081889 C15.6565609,16.7688602 15.9044745,17.1026581 16.266366,17.1667774 C16.7419947,17.2509341 17.1558254,16.8949774 17.1558254,16.444256 L17.1558254,12.2595253 L13.08629,12.2595253 Z",fill:"#15C39A"}))),r.createElement("p",{style:{position:"absolute",left:"111.05px",width:"823px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",borderBottom:"2px solid #e4e6f2",transform:"scale(0.563)",transformOrigin:"top left",paddingBottom:"21px",top:0,fontSize:"19px"}},"Report: ",t))},t.PDFReportFooter=function(){return r.createElement("div",{style:{marginLeft:"128.8807px",marginRight:"25.4686px",width:"100%",fontFamily:"Akkurat Std",fontSize:"19px",color:"#becafa",letterSpacing:"0.1px",lineHeight:"90px"}},r.createElement("div",{style:{position:"relative",top:"-19px",transform:"scale(0.563)",transformOrigin:"top left",width:"180%",borderTop:"1px solid #e4e6f2"}},r.createElement("div",{style:{position:"absolute",top:0,width:"100%",zIndex:1e3}},"Report was generated on ",(new Date).toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),r.createElement("span",{style:{float:"right"}},"Page ",r.createElement("span",{className:"pageNumber"})," of ",r.createElement("span",{className:"totalPages"})))))}},1793:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(13),i=n(211),o=n(1774);t.GeneralMetricsSection=function(e){var t=e.stats;return r.createElement("section",{className:o.generalMetricsSection},r.createElement("h2",{className:o.generalMetricsHeader},"General metrics"),r.createElement("table",null,r.createElement("tbody",null,r.createElement("tr",{className:o.metrics},r.createElement("td",null,t.chars.toLocaleString("en-US")),r.createElement("td",null,t.words.toLocaleString("en-US")),r.createElement("td",null,t.sentences),r.createElement("td",null,i.convertTimeToShortString(t.readingTime)),r.createElement("td",null,i.convertTimeToShortString(t.speakingTime))),r.createElement("tr",{className:o.text},r.createElement("td",null,"characters"),r.createElement("td",null,"words"),r.createElement("td",null,"sentences"),r.createElement("td",null,"reading",r.createElement("br",null),"time"),r.createElement("td",null,"speaking",r.createElement("br",null),"time")))))}},1794:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(13),i=n(122),o=n(1644),a=n(1504),s=n(573),l=n(1775);t.PlagiarismSection=i.withContext(function(e,t){var n=e.plagiarismData,i=t.textResources;return r.createElement("section",{className:l.plagiarismSection,"data-name":"section-plagiarism-"+(n.state===a.PlagiarismCheckingState.CHECKED?n.score:-1)},r.createElement("h2",{className:l.plagiarismSectionHeader},"Plagiarism"),n.state===a.PlagiarismCheckingState.NOT_CHECKED?r.createElement("p",{className:l.text},"This text hasn’t been checked for plagiarism"):n.score<=0?r.createElement("p",{className:l.original},r.createElement(s.Icon.Checkmark,{className:l.plagiarismMark}),"This text seems 100% original. Grammarly found no matching text on",r.createElement("br",null),"the Internet or in ProQuest’s databases."):r.createElement("table",{className:l.genericTable},r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",{className:l.score},r.createElement(o.RadialProgress,{color:{coordinates:{x1:"50%",y1:"0%",x2:"50%",y2:"100%"},start:"#e191e2",end:"#c770c8"},percentage:n.score,description:"%"})),r.createElement("td",{className:l.sources},r.createElement("div",{className:l.sourcesCount},n.sources),n.sources>1?"sources":"source")),r.createElement("tr",null,r.createElement("td",{colSpan:2,className:l.scoreDescription},i.denali.documentStats.report.plagiarismDescription(n.score,n.sources))))))})},1795:function(e,t,n){"use strict";function r(e){return e>l?{coordinates:{x1:"0%",y1:"50%",x2:"50%",y2:"50%"},start:"#0bc7c3",end:"#0fd5bf"}:e>c?{coordinates:{x1:"50%",y1:"0%",x2:"35%",y2:"100%"},start:"#ffde66",end:"#ffc148"}:{coordinates:{x1:"50%",y1:"50%",x2:"40%",y2:"100%"},start:"#ff4562",end:"#ff153e"}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(13),o=n(1644),a=n(573),s=n(1776),l=85,c=60,u=function(e){var t=e.issues,n=e.className,r=e.text;return i.createElement("div",{className:n},i.createElement("div",{className:s.issueCounter},t||i.createElement(a.Icon.Checkmark,null)),r)},d=function(e){var t=e.critical,n=e.advanced;return i.createElement("td",{className:s.issueCounters},i.createElement(u,{className:s.total,issues:t+n,text:"Issues left"}),i.createElement(u,{className:s.critical,issues:t,text:"Critical"}),i.createElement(u,{className:s.advanced,issues:n,text:"Advanced"}))},p=function(e){var t=e.score;return i.createElement("td",null,i.createElement(o.RadialProgress,{color:r(t),percentage:t}),i.createElement("p",{className:s.text},"This text scores better than ",t,"%",i.createElement("br",null),"of all texts checked by Grammarly"))},f=function(){return i.createElement("section",{className:s.section,"data-name":"no-writing-issues"},i.createElement("table",{className:s.scoreTable},i.createElement("thead",{className:s.sectionHeader},i.createElement("tr",null,i.createElement("th",{className:s.writingIssues},"Writing Issues"))),i.createElement("tbody",null,i.createElement("tr",null,i.createElement("td",{className:s.issuesSummary},i.createElement(a.Icon.Checkmark,null),i.createElement("span",null,"No issues found"))))))},h=function(e){var t=e.score,n=e.critical,r=e.advanced;return i.createElement("section",{className:s.section,"data-name":"section-score-"+t},i.createElement("table",{className:s.scoreTable},i.createElement("thead",{className:s.sectionHeader},i.createElement("tr",null,i.createElement("th",{className:s.score},"Score"),i.createElement("th",{className:s.writingIssues},"Writing Issues"))),i.createElement("tbody",null,i.createElement("tr",null,i.createElement(p,{score:t}),i.createElement(d,{critical:n,advanced:r})))))};t.ScoreSection=function(e){var t=e.score,n=e.critical,r=e.advanced;return n||r?i.createElement(h,{score:t,critical:n,advanced:r}):i.createElement(f,null)}},1796:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(13),i=n(1777);t.TitleSection=function(e){var t=e.title,n=e.author;return r.createElement("section",{className:i.titleSection},r.createElement("h1",{className:t.length<100?i.largeTitle:t.length<200?i.mediumTitle:i.smallTitle},t),r.createElement("p",{className:i.author},"by ",n))}},1797:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(13),i=n(1778),o=function(e){var t=e.maxIssues,n=e.count,o=n/t*100;return o>94&&o<98?o=94:o>=98&&(o=100),r.createElement("div",{className:i.progressBarBg},r.createElement("div",{className:i.issueProgressBar,style:{width:o+"%"}}))},a=function(e){var t=e.category,n=e.categoryIssues;return r.createElement("tr",{className:i.temporaryHeader},r.createElement("th",{className:i.categoryAmount},r.createElement("div",{className:n>99?i.oval:i.circle},n)),r.createElement("th",{className:i.categoryTitle},t),r.createElement("th",{className:i.progressBarCell}))};t.WritingIssuesSection=function(e){var t=e.issues,n=0;return r.createElement("section",{className:i.writingIssuesSection},r.createElement("h2",{className:i.sectionHeader},"Writing Issues"),Object.entries(t).map(function(e){var t=e[0],r=e[1],i=0;return{category:t,issues:Object.entries(r).map(function(e){var t=e[0],r=e[1];return r>n&&(n=r),i+=r,{name:t,count:r}}),issuesCount:i}}).map(function(e){var t=e.category,s=e.issuesCount,l=e.issues;return r.createElement("table",{key:t,className:i.writingIssuesTable},r.createElement("thead",{className:i.issueHeader},r.createElement(a,{category:t,categoryIssues:s})),r.createElement("tbody",null,l.map(function(e){var t=e.name,a=e.count;return r.createElement("tr",{key:t,className:i.issueContent},r.createElement("td",{className:i.issueAmount},a),r.createElement("td",{className:i.issueTitle},t),r.createElement("td",null,r.createElement(o,{maxIssues:n,count:a})))})))}))}},1798:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(31),i=n(0),o=n(7),a=n(6),s=n(575),l=n(3),c=n(1463),u=n(1465),d=n(1497),p=function(){function e(e){var t=this;this._stateEmitter=e,this.cardEvents=new r.Subject,this.state=o.Atom.create(d.closedLensState()),this._log=a.Monitoring.Logging.getLogger("FocusedLensManagerImpl"),this._currentStateEmitter=o.Atom.create(i.Observable.empty()),this._subs=[],this.focusLens=function(e,n,r){void 0===r&&(r={}),t._log.debug("Focus Lens "+e);var i=t.state.get(),o=l.ObjectUtils.update(i,{switchOrder:r.order||i.switchOrder,alertSource:n});t._currentStateEmitter.set(t._stateEmitter.getLensEventsByLensId(o,e))},this.focusAlert=function(e,n,r){t._log.isEnabled(a.Logging.LogLevel.TRACE)&&t._log.trace("focusAlert("+e+")");var i=t.state.get(),o=l.ObjectUtils.update(i,{switchOrder:r||i.switchOrder,alertSource:n});t._currentStateEmitter.set(t._stateEmitter.getLensEventsByAlert(o,e.lensId,e))},this._subs.push(this._currentStateEmitter.switch().do(function(e){var n=e.state,r=e.cardsToAdd,i=e.cardsToRemove;l.notEmpty(i)&&t.cardEvents.next({kind:"cards_removed",cards:i}),t.state.set(n),l.notEmpty(r)&&t.cardEvents.next({kind:"cards_added",cards:r})}).subscribe(),this.state.filter(function(e){return!e.currentLens.activeCardScheduledToDispose}).map(u.LensState.getActiveAlert).switchMap(l.RxUtils.toOptionValueOnly).distinctUntilChanged(function(e,t){return e.id===t.id}).switchMap(l.RxUtils.Scheduler.rafScheduler).subscribe(function(e){return e.sendFeedback(s.FeedbackType.LOOKED,c.AlertActionSource.sidebar).commit()}))}return e.prototype.disposeCard=function(e){this._log.debug("Disposing card",e.cardId),this.state.lens("currentLens").modify(function(t){return t.dispose(e)})},e.prototype.dispose=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},e}();t.DefaultLensStateManagerImpl=p},1799:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(14),o=n(23),a=n(7),s=n(6),l=n(54),c=n(3),u=function(){function e(e,t){var n=this;this.details=e,this._ops=t,this.active=a.Atom.create(!1),this.select=function(){n._ops._updateActive(n.details.turnaround)},this.placeOrder=function(){return n._ops._placeOrder(n.details.turnaround)}}return e.prototype.toggleActive=function(e){return this.active.set(e),this},e}(),d=function(){function e(e,t,n,o,u){var d=this;this._proofit=e,this._notifications=t,this._ded=n,this._user=o,this._goToMyDocuments=u,this.viewState=a.Atom.create(i.None),this._log=s.Monitoring.Logging.getLogger("ProofitView"),this._updateActive=function(e){d.viewState.modify(function(t){return t.map(function(t){var n=t.plans,r=t.words,i=t.proofitState;return{plans:n.map(function(t){return t.toggleActive(t.details.turnaround===e)}),words:r,proofitState:i}})})},this._placeOrder=function(e){return d._user.features.proofitTest.map(function(e){return Promise.resolve(d._proofit.updateState(d._getResultMock(l.Proofit.parseStatus(e))))}).getOrElseL(function(){return d._proofit.placeOrder(e)})};var p=this._user.subscription.state.get().value;this._proofit.state.subscribe(function(e){e.map(function(e){switch(e.kind){case"submitted":d._log.info("Document submitted for proofreading"),d._goToMyDocuments();break;case"finished":case"cancelled":break;case"error":d._showErrorNotification(e.errorType,p),d._log.error("Error sending document for proofreading:",e.errorType);break;default:c.assertNever(e)}}),d.viewState.modify(function(t){return t.map(function(t){return r.__assign({},t,{proofitState:e})})})})}return e.prototype._showErrorNotification=function(e,t){switch(e){case"payment":var n=t.creditCard?i.Some(t.creditCard.suffix):i.None;this._notifications.show(this._notifications.create.proofitPaymentDeclinedError(t.paymentMethod,n));break;case"emptyDocument":this._notifications.show(this._notifications.create.proofitEmptyDocumentError());break;case"alreadyProofread":this._notifications.show(this._notifications.create.proofitDocumentProofreadError(this._goToMyDocuments));break;case"unknown":this._notifications.show(this._notifications.create.error());break;default:c.assertNever(e)}},e.prototype.requestPlans=function(){var e=this;return this._ded.contentUpdated.auditTime(1e3).startWith(void 0).subscribe(function(){return e._proofit.getPlans().then(function(t){e.viewState.set(i.Some({words:t.words,plans:t.turnaroundOptions.map(function(t){return new u(t,e)}).sort(function(e,t){return t.details.turnaround-e.details.turnaround}),proofitState:i.None}))}).catch(function(t){e._log.warn("Error querying proofit plan options",t),e._notifications.show(e._notifications.create.error())})})},e.prototype._getResultMock=function(e){var t=new Date;return{downloadResultUrl:i.None,submitted:t.getTime(),corrections:5,due:t.setHours(t.getHours()+3),price:666,name:"",completed:i.None,id:1,status:e,is_dox_applied:!0}},e}();t.ProofitViewModelImpl=d;!function(e){var t=function(){function e(e){var t=this;this._proofit=e,this.viewState=a.Atom.create(i.None),this._updateActive=function(e){return t.viewState.modify(function(t){return t.map(function(t){var n=t.plans,r=t.words,i=t.proofitState;return{plans:n.map(function(t){return t.toggleActive(t.details.turnaround===e)}),words:r,proofitState:i}})})},this._placeOrder=function(){return new Promise(function(e){return setTimeout(e,1e3)})}}return e.prototype.requestPlans=function(){var e=this;return o.Observable.fromPromise(this._proofit.getPlans().then(function(t){e.viewState.set(i.Some({words:t.words,plans:t.turnaroundOptions.map(function(t){return new u(t,e)}).sort(function(e,t){return t.details.turnaround-e.details.turnaround}),proofitState:i.None}))}).catch(console.error)).subscribe()},e}();e.Mock=t}(t.ProofitViewModel||(t.ProofitViewModel={}))},1800:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1465);t.AlertSwitchOrder=r.AlertSwitchOrder,t.SidebarViewModel=r.SidebarViewModel;var i=n(1463);t.AlertActionSource=i.AlertActionSource},1801:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(14),a=n(7),s=n(54),l=n(3),c=n(573),u=n(1461),d=n(1483),p=n(1467),f=n(1481),h=n(1726),m=n(122),g=n(123),v=n(1467),_=n(1542),b=n(1520),y=n(311),w=function(e){var t=e.title;return i.createElement(u.InfoButton,{title:t,titleAlign:"right",iconClass:h.infoIcon,iconWidth:10,tooltipClass:h.goalsTooltip})},E=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._localContext=a.Atom.create(t.props.documentContext),t._style=t._localContext.lens("style"),t._goals=t._localContext.lens("goals"),t._audience=t._localContext.lens("audience"),t._emotion=t._localContext.lens("emotion"),t._domain=t._localContext.lens("domain"),t._showSetGoalsLoader=a.Atom.create(t.props.settingsModel.enableSetGoalsLoader.get()),t._source="user",t._showSetGoalsLoaderCheckbox=t.props.features.denali.openOnPasteAndUploadMode.contains(g.DenaliFeatures.OpenOnPasteOrUploadMode.goalsLoader),t}return r.__extends(t,e),t.prototype.componentDidMount=function(){this._source=this.props.visibilitySource.view(function(e){return"setGoalsLoader"===e?"setGoalsLoader":"user"}).get(),this.context.gnarSpec.goalsPopupShow(this.context.pageId,this._source)},t.prototype.componentWillUnmount=function(){if("forceHidden"!==this.props.visibilitySource.get()){var e=this._localContext.get(),t=this.props.updateContext(e),n=this._showSetGoalsLoader.get();this.props.settingsModel.enableSetGoalsLoader.get()!==n&&(this.props.settingsModel.updateSetGoalsLoader(n),this.context.gnarSpec.showGoalsNewDocumentFormSuccess(n,this.context.pageId,this._source)),t&&this.context.gnarSpec.goalsFormSuccess(this.context.pageId,this._source,e.audience.getOrElse(void 0),e.domain,e.emotion.getOrElse(void 0),Array.from(e.goals),e.style.getOrElse(void 0))}},t.prototype.setDomain=function(e){l.invariant(s.DocumentContext.isStyleValidWithDomain(e,this._style.get()),"can't enter disabled domain "+e),this._domain.set(e)},t.prototype.toggleGoal=function(e){this._goals.modify(function(t){var n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},t.prototype.setStyle=function(e){l.invariant(s.DocumentContext.isStyleValidWithDomain(this._domain.get(),e),"can't enter disabled style "+e),this._style.modify(this._toggle(e))},t.prototype.setAudience=function(e){this._audience.modify(this._toggle(e))},t.prototype.setEmotion=function(e){this._emotion.modify(this._toggle(e))},t.prototype._toggle=function(e){return function(t){return e.equals(t)?o.None:e}},t._getGoalLabel=function(e){var t=s.DocumentContext.goalsLabels[s.DocumentContext.goals.indexOf(e)];return l.invariant(void 0!==t,"Goal label should be defined"),t},t.prototype.render=function(){var e=this;return i.createElement(f.Modal,{className:h.wrapper},i.createElement(f.Modal.Header,null,i.createElement(x,{className:h.image}),i.createElement(p.H1,{className:h.title},"Set goals"),i.createElement(p.P2,{className:h.description},this.context.textResources.denali.goals.header)),i.createElement(f.Modal.Body,r.__assign({},a.classes(h.wrapper,h.wrapperFree)),i.createElement("div",{className:h.row},i.createElement("div",{className:h.rowHeader},i.createElement(p.Paper,{className:h.rowHeader},"Intent"),i.createElement("div",{className:h.experimental},"Experimental ",i.createElement(w,{title:this.context.textResources.denali.documentStats.intentTooltip}))),i.createElement(u.Button.Group,null,s.DocumentContext.goals.map(function(n){return i.createElement(u.Button.White,{key:n,name:"context-goal-"+n,active:e._goals.view(function(e){return e.has(n)}),onClick:function(){return e.toggleGoal(n)}},t._getGoalLabel(n))}))),i.createElement("div",{className:h.row},i.createElement(p.Paper,{className:h.rowHeader},"Audience"),i.createElement(u.Button.Group,{sticky:!0},s.DocumentContext.audiences.map(function(t){return i.createElement(u.Button.White,{key:t,name:"context-audience-"+t,active:e._audience.view(function(e){return e.contains(t)}),onClick:function(){return e.setAudience(o.Some(t))}},t)}))),i.createElement("div",{className:h.row},i.createElement(p.Paper,{className:h.rowHeader},"Style"),i.createElement(u.Button.Group,{sticky:!0},s.DocumentContext.styles.map(function(t){var n=e._domain.view(function(e){return!s.DocumentContext.isStyleValidWithDomain(e,o.Some(t))});return i.createElement(u.Button.White,{key:t,name:"context-style-"+t,active:e._style.view(function(e){return e.contains(t)}),onClick:function(){return e.setStyle(o.Some(t))},disabled:n,title:n.view(function(n){return n?"Style "+t+" is incompatible with "+e._domain.get()+" domain":""})},t)}))),i.createElement("div",r.__assign({},a.classes(h.row,this.props.features.isFree&&h.noBottomMargin)),i.createElement("div",{className:h.rowHeader},i.createElement(p.Paper,{className:h.rowHeader},"Emotion"),i.createElement("div",{className:h.experimental},"Experimental ",i.createElement(w,{title:this.context.textResources.denali.documentStats.emotionTooltip}))),i.createElement(u.Button.Group,{sticky:!0},s.DocumentContext.emotions.map(function(t){return i.createElement(u.Button.White,{key:t,name:"context-emotion-"+t,active:e._emotion.view(function(e){return e.contains(t)}),onClick:function(){return e.setEmotion(o.Some(t))}},t)}))),i.createElement("div",{className:this.props.features.isFree?h.rowFree:h.row},i.createElement("div",r.__assign({},a.classes(h.row,h.noBottomMargin)),i.createElement(p.Paper,{className:h.rowHeader},"Domain"),i.createElement(d.Dropdown,{align:"right",vAlign:"bottom",label:i.createElement(u.Button.White,{name:"domain-select",active:!1,className:h.select},this._domain,i.createElement(c.Icon.More,{className:h.selectIcon})),theme:h,name:"goals-domain"},this._domain.view(function(t){return s.DocumentContext.domains.filter(function(e){return e!==t}).map(function(t){var n=e.props.features.isFree?a.Atom.create(!0):e._style.view(function(e){return!s.DocumentContext.isStyleValidWithDomain(t,e)});return i.createElement(u.Button.Flat,{className:h.capitalize,key:t,name:"context-domain-"+t,onClick:function(){return e.setDomain(t)},title:e.props.features.isFree?"":n.view(function(n){return n?"Domain "+t+" is incompatible with "+e._style.get().get()+" style":""}),disabled:n},t)})}))),this.props.features.isFree&&i.createElement(v.Small,{className:h.freeBlock},this.context.textResources.denali.goals.upgradeHookTitle," ",i.createElement(_.UpgradeButton,{size:"link",upgradeViewModel:this.props.upgradeViewModel,place:"editorDenaliGoals"})))),i.createElement(f.Modal.Footer,null,i.createElement("div",r.__assign({},a.classes(this._showSetGoalsLoaderCheckbox&&h.footerWrapper)),this._showSetGoalsLoaderCheckbox&&i.createElement(b.BlueCheckbox,{checked:this._showSetGoalsLoader,name:"set-goals"},i.createElement("div",{className:h.checkboxText},"Show ",i.createElement("b",null,"Set Goals")," when I start a new document")),i.createElement(u.Button.Blue,{name:"closeSetContext",onClick:this.props.close},"Done"))))},t}(m.BaseComponent);t.SetGoalsView=E;var k=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._visible=y.DocumentLoader.SetGoalsVisibilitySource.toVisible(t.props.visible,"user"),t._close=function(){return t._visible.set(!1)},t}return r.__extends(t,e),t.prototype.render=function(){var e=this;return i.createElement(f.Overlay,{visible:this._visible,animate:!0},this.props.documentModel.context.view(function(t){return i.createElement(E,{key:"set-goals-view",features:e.props.features,updateContext:e.props.documentModel.updateContext,settingsModel:e.props.settingsModel,close:e._close,documentContext:t,upgradeViewModel:e.props.upgradeViewModel,visibilitySource:e.props.visible})}))},t}(i.Component);t.SetGoalsModal=k;var x=function(e){var t=e.className;return i.createElement("svg",{className:t,width:"69",height:"80",viewBox:"0 0 69 80"},i.createElement("g",{fill:"none",fillRule:"evenodd"},i.createElement("path",{d:"M28.935 70C12.955 70 0 57.045 0 41.065 0 25.085 12.955 12.13 28.935 12.13c15.98 0 28.936 12.954 28.936 28.935C57.87 57.045 44.917 70 28.936 70zm0-12.242c9.22 0 16.694-7.474 16.694-16.693 0-9.22-7.475-16.694-16.695-16.694s-16.693 7.475-16.693 16.695 7.474 16.693 16.693 16.693z",fill:"#4C7AF1"}),i.createElement("path",{d:"M28.935 57.758c-9.22 0-16.693-7.474-16.693-16.693 0-9.22 7.474-16.694 16.693-16.694 9.22 0 16.694 7.475 16.694 16.695s-7.475 16.693-16.695 16.693zm0-11.13c3.074 0 5.565-2.49 5.565-5.563 0-3.074-2.49-5.565-5.565-5.565-3.073 0-5.564 2.49-5.564 5.565 0 3.073 2.492 5.564 5.565 5.564z",fill:"#BCDBFB"}),i.createElement("circle",{fill:"#FFF",cx:"28.935",cy:"41.065",r:"5.565"}),i.createElement("g",{stroke:"#4C7AF1",strokeWidth:"1.5",strokeLinecap:"round"},i.createElement("path",{d:"M15.024 68.016L9.46 78.5M41.734 68.016L47.298 78.5"})),i.createElement("path",{d:"M61.96 13.367c.356 0 .645.293.645.656 0 .362-.29.655-.646.655h-6.075L29.35 41.7c-.126.128-.29.192-.456.192-.166 0-.33-.064-.457-.192-.252-.256-.252-.67 0-.927L54.972 13.75V7.59c0-.363.288-.656.645-.656.357 0 .646.293.646.656v5.777h5.696zm3.17-3.215c.357 0 .646.293.646.655 0 .362-.29.655-.646.655h-6.34c-.358 0-.647-.293-.647-.655V4.372c0-.362.29-.655.646-.655.356 0 .644.293.644.655v5.78h5.696zm3.17-3.218c.358 0 .647.293.647.656 0 .362-.29.655-.646.655h-6.34c-.358 0-.647-.293-.647-.655V1.155c0-.362.29-.655.646-.655.356 0 .645.293.645.655v5.78H68.3z",fill:"#4C7AF1"}),i.createElement("path",{d:"M49.267 20.486l-8.586 8.757",stroke:"#FFF",strokeWidth:"1.3"})))}},1802:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(122),s=n(312),l=n(1464),c=n(1800),u=n(1489),d=n(1521),p=n(1461),f=n(1641),h=n(3),m=n(1577),g=n(1485),v=n(1465),_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._rendered=!1,t._focusedLensOrderNumber=o.Atom.combine(t.props.pageViewModel.state,t.props.sidebarViewModel.lenses,function(e,t){var n=e.currentLens;return t.findIndex(function(e){return e.id!==n.id})}),t}return r.__extends(t,e),t.prototype.componentDidMount=function(){var e=this;requestAnimationFrame(function(){e._rendered=!0})},t.prototype._renderList=function(){var e=this,t=this.props,n=t.sidebarViewModel,a=t.pageViewModel;return i.createElement(g.Onboarding,{key:"onboarding",alignment:"bottomFlexible",eventType:"onclick",stepId:"step7",title:"Focused editing",message:"Categorized suggestions help you concentrate on specific aspects of your writing.",findFirstButton:{dotPosition:"center",buttonOrder:this._focusedLensOrderNumber,notificationPosition:"underButton"},themes:{containerClassName:m.onboardingContainer,containerWrapperClassName:m.onboardingContainer,notificationClassName:m.onboardingNotification,triangleClassName:m.triangleClassName}},i.createElement(u.ScrollBarY,r.__assign({name:"lenses"},o.classes(m.itemList,this.props.className),{update:n.lenses.view("length"),allowHover:!0,key:"list"}),n.lenses.switchMap(h.RxUtils.Scheduler.rafScheduler).map(function(t){return t.map(function(t,r){return i.createElement(f.FlowPosition,{key:t.id,offset:e._getOffset(r),theme:m},i.createElement(b,{lens:t,sidebarViewModel:n,pageViewModel:a,parentRendered:e._rendered}))}).concat([e._renderAdvanced({position:t.length})])}).startWith(null)))},t.prototype._getOffset=function(e){return 2.55*e+"rem"},t.prototype._renderAdvanced=function(e){var t=this,n=e.position;return this.props.features.isFree?i.createElement(f.FlowPosition,{key:"lens-advanced",offset:this._getOffset(n),theme:m},this.props.sidebarViewModel.premium.view(function(e){var r=e.count;return r>0?i.createElement("div",{className:m.advancedBtn},n>0&&i.createElement("div",{className:m.advancedDelimiter}),i.createElement(y,{count:r,pageViewModel:t.props.pageViewModel,sidebarViewModel:t.props.sidebarViewModel,features:t.props.features})):null})):null},t.prototype.render=function(){return i.createElement("div",{className:m.wrapper},this._renderList())},t}(a.BaseComponent);t.LensesNavigation=_;var b=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._animateIn=t.props.parentRendered,t._active=o.Atom.create(!1),t._toLens=function(){var e=t.props,n=e.lens;e.pageViewModel.switchToLens(n.id,c.AlertActionSource.sidebar,"lensOrder")},t}return r.__extends(t,e),t.prototype.componentWillMount=function(){this._focusedLens=this.props.pageViewModel.state.switchMap(h.RxUtils.Scheduler.rafScheduler).map(v.LensState.is(this.props.lens.id)).subscribe(h.RxUtils.toAtom(this._active))},t.prototype.componentWillUnmount=function(){this._focusedLens.unsubscribe()},t.prototype.render=function(){var e=this,t=this.props.lens;return i.createElement(p.Button.SidebarFlat,r.__assign({name:"lens-"+t.id},o.classes(this._animateIn&&m.lensBtnAnimate),{active:this._active,disabled:this._active,onClick:function(){e.context.gnarSpec.openLensButtonClick(h.StringUtils.camelize(t.title),e.context.pageId),e._toLens()}}),i.createElement(o.F.div,null,t.title),i.createElement(d.Counters.Counter,{count:t.count,type:this._active.view(function(e){return e?"Advanced"===t.type?"yellow":"red":"gray"}),theme:m}))},t}(a.BaseComponent),y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._trackingPlacement=function(){return t.props.pageViewModel.sidebarOpened?"wiritingAssistant":"writingMode"},t._toAdvanced=function(){t.context.gnarSpec.advancedIssuesButtonClick(t.context.pageId,t._trackingPlacement()),t.props.pageViewModel.switchToAdvanced()},t._isActive=t.props.pageViewModel.state.view(v.LensState.is(l.Lens.SpecialId.Premium)),t}return r.__extends(t,e),t.prototype.render=function(){var e=this;return i.createElement(p.Button.SidebarFlat,{name:"lens-advanced",className:m.advancedBtn,active:this._isActive,disabled:this._isActive,onClick:function(){e._toAdvanced()}},i.createElement(o.F.div,null,this.props.features.denali.alertGroupNames===s.AlertGroupNames.CRITICAL_ADVANCED?this.context.textResources.denali.sidebar.advancedIssues:this.context.textResources.denali.sidebar.premiumAlerts),i.createElement(d.Counters.Counter,{key:"count",count:this.props.count,type:"yellow",theme:m}))},t}(a.BaseComponent)},1803:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(23),a=n(7),s=n(54),l=n(1467),c=n(1461),u=n(1494),d=n(3),p=n(158),f=n(6),h=n(75),m=n(1546),g=n(1489),v=n(1687),_=n(1529),b=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(n,e),n.prototype.render=function(){var e=this.props,n=e.proofit,o=e.transition,s=e.subscription;return i.createElement(a.F.div,r.__assign({},a.classes(o.map(function(e){return e.base}),v.wrapper)),i.createElement(m.SidebarHeader,{title:"Human Proofreading",theme:{wrapper:_.header}}),i.createElement(g.ScrollBarY,{name:"proofit",allowHover:!0,className:_.contentWrapper},i.createElement(l.P2,{className:_.info},"Save time and ensure accuracy with professional proofreaders. They are ready to check your text right now."),i.createElement(t.ProofitView,r.__assign({},{proofit:n,subscription:s}))))},n}(i.Component);t.ProofitSidebarView=b,t.ProofitView=function(e){var t=e.proofit,n=e.subscription;return i.createElement(h.Lifecycle,{onMount:function(){return t.requestPlans()}},i.createElement(a.F.div,{className:v.proofitDetailsWrapper},t.viewState.combineLatest(n).switchMap(function(e){var t=e[0],n=e[1];return t.fold(function(){return o.Observable.of(i.createElement(u.Spinner,{variation:"blue",className:v.loader})).delay(500).startWith(null)},function(e){return o.Observable.of(i.createElement("div",null,i.createElement(l.P1,null,"How fast do you need your document returned?"),i.createElement(a.F.div,{className:v.plansContainer},e.plans.map(function(t){return i.createElement(w,{key:t.details.turnaround,plan:t,words:e.words,subscription:n.value,proofitState:e.proofitState})}))))})})))};var y=function(e){switch(e){case s.Proofit.PlanType.TwentyFourHours:return i.createElement(t.PaperPlane,null);case s.Proofit.PlanType.ThreeHours:return i.createElement(t.Jet,null);case s.Proofit.PlanType.Instant:return i.createElement(t.SpaceShuttle,null);default:return void d.assertNever(e)}},w=function(e){var t=e.plan,n=e.words,o=e.subscription,d=e.proofitState,f=t.details,h=f.label.replace("Within ","");return i.createElement(a.F.div,r.__assign({},a.classes(t.active.view(function(e){return t.details.enabled?e?v.planWrapperActive:v.planWrapper:v.planWrapperDisabled}),f.turnaround===s.Proofit.PlanType.ThreeHours&&v.mostPopular),{"data-name":h.replace(" ","")}),i.createElement("div",{className:v.iconContainer},y(f.turnaround)),i.createElement(a.F.div,{className:v.plans},i.createElement(a.F.div,{className:v.planContainer},t.details.enabled?i.createElement("div",null,i.createElement(l.Paper,{className:v.planTitle},h),i.createElement(l.Paper,{className:v.price},"$ ",p.formatPrice(f.price))):f.turnaround===s.Proofit.PlanType.Instant?i.createElement(l.Paper,{className:v.planTitle},"30 minutes"):i.createElement(l.Paper,{className:v.planTitle},h),t.active.view(function(e){return e?i.createElement(c.Button.Blue,{key:"place-order",name:"place-order",className:v.orderButton,onClick:t.placeOrder,active:!0},"place order",d.fold(function(){return i.createElement(u.Spinner,{className:v.planLoading,variation:"white",size:18})},function(){return null})):i.createElement(c.Button.Grey,{key:"select-order",name:"select-order",className:v.button,onClick:t.select,disabled:!t.details.enabled},t.details.enabled?"select":"unavailable")})),t.details.enabled?i.createElement(l.Small,{name:"price-per-word"},"$ ",f.perWord," per word x ",n," words"):i.createElement(l.Small,{className:v.descriptionDisabled},"Proofreaders are busy",i.createElement("br",null),"or the document is too long"),t.active.view(function(e){return e&&i.createElement(E,{key:"warning",price:t.details.price,subscription:o})})))},E=function(e){var t=e.price,n=e.subscription;switch(n.paymentMethod){case"payPal":return i.createElement(l.Small,{className:v.paymentWarning},"By clicking ",i.createElement("b",null,"Place order")," you authorize a charge of"," ",i.createElement("b",{"data-name":"payment-warning-price"},"$",p.formatPrice(t))," to your PayPal account.");case"creditCard":if(!n.creditCard)throw new Error("Missing credit card");return i.createElement(l.Small,{className:v.paymentWarning},"By placing an order you agree that your card ending in"," ",i.createElement("b",null,n.creditCard.suffix)," will be charged for"," ",i.createElement("b",{"data-name":"payment-warning-price"},"$",p.formatPrice(t)),".");default:return f.Monitoring.Logging.getLogger("ProofitView").warn("Unknown payment method: "+n.paymentMethod),null}};t.PaperPlane=function(){return i.createElement("svg",{width:64,viewBox:"0 0 64 64"},i.createElement("g",{fill:"none"},i.createElement("circle",{cx:"32",cy:"32",r:"32",fill:"#A1E7D7"}),i.createElement("path",{fill:"#FFF",d:"M49.45 44.602l-18.694-7.337L54.636 3.94"}),i.createElement("path",{fill:"#B5EADE",d:"M28.3 44.808l1.98-6.515 1.91.755"}),i.createElement("path",{fill:"#D1F6ED",d:"M22.774 34.385L51.43 6.545l-21.97 30.65v.07c0 .068-.068.068-.068.137l-2.866 9.394-3.752-12.41z"}),i.createElement("path",{fill:"#FFF",d:"M51.43 4.9L21.954 33.56l-10.78-3.977"}),i.createElement("path",{fill:"#8189A9",fillRule:"nonzero",d:"M56 1.813v-.205c0-.07 0-.07-.068-.138-.068 0-.137-.068-.137-.068-.068-.07-.068-.07-.136-.07h-.208c-.136 0-.136 0-.204.07L9.605 29.242c-.204.137-.273.343-.273.548 0 .206.137.412.34.48l11.94 4.39 4.368 14.262c.07.206.274.41.547.41s.478-.136.546-.41l.137-.412 6.002-8.982 16.443 6.445c.068 0 .136.07.205.07.068 0 .204 0 .273-.07.136-.068.272-.205.272-.41L55.932 2.02 56 1.81zM51.43 4.9L21.954 33.56l-10.78-3.977L51.43 4.9zM22.773 34.384L51.43 6.544l-21.97 30.65c0 .14-.068.14-.068.208l-2.866 9.394-3.752-12.41zM28.3 44.808l1.98-6.515 1.91.755-3.89 5.76zm21.15-.206l-18.694-7.337L54.636 3.94 49.45 44.6z"})))},t.Jet=function(){return i.createElement("svg",{width:98,viewBox:"0 0 98 64",className:v.jetIcon},i.createElement("g",{fill:"none"},i.createElement("circle",{cx:"47",cy:"32",r:"32",fill:"#99CBF9"}),i.createElement("path",{fill:"#D9EEFF",fillRule:"nonzero",stroke:"#99CBF9",d:"M64.227 35.22h-5.112c-.918 0-1.72-.62-1.94-1.506-.525-2.085-2.71-3.43-4.853-2.922-.85.198-1.74-.173-2.186-.924-1.46-2.463-4.154-3.993-7.026-3.993-3.035 0-5.8 1.66-7.217 4.33-.502.946-1.667 1.327-2.635.867-1.113-.53-2.45-.516-3.558.042-.508.256-1.103.284-1.633.08-.53-.206-.948-.625-1.147-1.155-.94-2.49-3.37-4.17-6.05-4.17-2.502 0-4.802 1.457-5.86 3.712-.37.785-1.216 1.236-2.07 1.13-.172-.02-.35-.035-.528-.035-1.857 0-3.467 1.247-3.917 3.032-.22.884-1.022 1.504-1.94 1.504H5.13c-2.482 0-4.503 2.003-4.503 4.468 0 2.464 2.02 4.468 4.504 4.468h59.1c2.486 0 4.507-2.003 4.507-4.467 0-2.465-2.02-4.47-4.503-4.47z"}),i.createElement("g",{stroke:"#8189A9"},i.createElement("path",{fill:"#FFF",d:"M30.293 44.795s6.3 4.423 11.563 3.495l52.22-9.208c1.985-.35 3.31-2.243 2.96-4.228-.35-1.986-2.243-3.31-4.228-2.96l-3.464.552c-1.57-2.593-2.467-2.954-4.548-3.15l-46.654 8.227-7.85 7.272z",strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{fill:"#E8EAF1",d:"M42.757 42.74L31.2 44.776c-1.597.28-3.122-.8-3.406-2.414-.285-1.615.778-3.152 2.374-3.434l11.558-2.04c1.596-.28 3.12.8 3.405 2.416.29 1.614-.772 3.15-2.37 3.433zm40.138-1.687L58.54 45.348c-1.444.255-2.822-.71-3.076-2.154-.255-1.444.71-2.82 2.154-3.075l24.355-4.3c1.444-.256 2.82.71 3.076 2.153.25 1.444-.71 2.82-2.16 3.075z"}),i.createElement("path",{fill:"#FFF",d:"M30.85 38.81l-8.9-15.88 4.352-.768s17.838 14.304 27.67 12.57L30.85 38.81z",strokeLinecap:"round",strokeLinejoin:"round"}))))},t.SpaceShuttle=function(){return i.createElement("svg",{width:98,viewBox:"0 0 98 85",className:v.rocketIcon},i.createElement("g",{fill:"none",transform:"translate(0 1)"},i.createElement("circle",{cx:"32",cy:"38.667",r:"32",fill:"#F9E799"}),i.createElement("path",{fill:"#FFF",stroke:"#99CBF9",d:"M32.137 58.667c3.556 2.19 6 6.74 6 12 0 5.258-2.444 9.808-6 12-3.556-2.192-6-6.742-6-12 0-5.26 2.444-9.81 6-12z"}),i.createElement("path",{fill:"#FF987C",d:"M32.137 58.667c2.276 1.587 3.84 4.883 3.84 8.692 0 3.8-1.564 7.1-3.84 8.69-2.275-1.59-3.84-4.89-3.84-8.69 0-3.81 1.565-7.11 3.84-8.7z"}),i.createElement("path",{fill:"#FFF",d:"M32.137 58.667c1.386.793 2.34 2.44 2.34 4.346 0 1.904-.954 3.552-2.34 4.346-1.386-.8-2.338-2.45-2.338-4.35 0-1.91.95-3.56 2.33-4.35z"}),i.createElement("path",{fill:"#FFF",stroke:"#99CBF9",d:"M44.546 58.667c2.376 1.46 4.008 4.494 4.008 8 0 3.504-1.632 6.537-4.008 7.998-2.376-1.46-4.01-4.494-4.01-8 0-3.504 1.634-6.538 4.01-7.998z"}),i.createElement("path",{fill:"#FF987C",d:"M44.546 58.667c1.52 1.058 2.565 3.255 2.565 5.794 0 2.54-1.04 4.74-2.56 5.8-1.52-1.06-2.56-3.25-2.56-5.79s1.047-4.734 2.567-5.792z"}),i.createElement("path",{fill:"#FFF",d:"M44.546 58.667c.926.53 1.562 1.627 1.562 2.897 0 1.27-.636 2.368-1.562 2.897-.926-.52-1.563-1.62-1.563-2.89s.637-2.37 1.563-2.893z"}),i.createElement("path",{fill:"#FFF",stroke:"#99CBF9",d:"M19.68 58.667c2.375 1.46 4.008 4.494 4.008 8 0 3.504-1.633 6.537-4.01 7.998-2.375-1.46-4.008-4.494-4.008-8 0-3.504 1.633-6.538 4.01-7.998z"}),i.createElement("path",{fill:"#FF987C",d:"M19.68 58.667c1.52 1.058 2.564 3.255 2.564 5.794 0 2.54-1.045 4.74-2.565 5.8-1.52-1.06-2.57-3.25-2.57-5.79s1.04-4.734 2.56-5.792z"}),i.createElement("path",{fill:"#FFF",d:"M19.68 58.667c.925.53 1.56 1.627 1.56 2.897 0 1.27-.635 2.368-1.56 2.897-.927-.52-1.563-1.62-1.563-2.89s.636-2.37 1.562-2.893z"}),i.createElement("path",{fill:"#D9EEFF",stroke:"#8189A9",d:"M22.34 38.825V15.68S24.657.218 32 .218c7.342 0 9.66 15.464 9.66 15.464v23.145H22.34z"}),i.createElement("path",{fill:"#FFF",stroke:"#8189A9",d:"M37.89 54.766h11.142v-6.02s.12-4.03-4.754-7.642c-4.368-3.235-6.08-6.52-6.387-9.634v23.296zm-11.733 0h-11.19v-6.02s-.12-4.03 4.755-7.642c4.716-3.494 6.335-7.043 6.435-10.377v24.04zm11.68 0V19.5s-.72-7.7-5.837-8.49c-5.116.788-5.838 8.487-5.838 8.487v35.266h11.676z"}),i.createElement("path",{fill:"#D9EEFF",stroke:"#8189A9",d:"M41.812 38.852V25.157s.485-6.92 3.24-6.92c2.757 0 3.243 6.92 3.243 6.92v20.885l-6.483-7.19zm-19.472 0V25.157s-.485-6.92-3.24-6.92c-2.756 0-3.242 6.92-3.242 6.92v20.365l6.482-6.67z"}),i.createElement("path",{stroke:"#8189A9",d:"M28.98 21.03c0-1.667 1.352-3.018 3.02-3.018 1.667 0 3.018 1.35 3.018 3.018",strokeLinecap:"round"}),i.createElement("path",{fill:"#D9EEFF",stroke:"#8189A9",d:"M29.134 54.77l-1.888 3.103h9.508l-1.886-3.102zm-11.77-.004l-1.506 2.477h7.59l-1.506-2.477zm24.846 0l-1.505 2.477h7.59l-1.506-2.477z"}),i.createElement("path",{stroke:"#8189A9",d:"M48.085 23.11h-6.063M38.667 5.778H25.333M22.13 23.11h-6.063"})))}},1804:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(1563),s=n(1461),l=n(1730),c=n(23),u=n(573),d=n(122),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._subs=[],t}return r.__extends(t,e),t.prototype.componentDidMount=function(){var e=this;this._title&&(this._title.focus(),this._subs.push(c.Observable.fromEvent(document,"keydown").subscribe(function(t){a.SearchViewModel.isCmdKeyPressed(t,a.SearchViewModel.KEY_F)?(e._title&&(e._title.focus(),e._title.select()),t.preventDefault()):a.SearchViewModel.isCmdShiftKeyPressed(t,a.SearchViewModel.KEY_G)?(e._resultFunctionOrSelect(function(e){return e.prev()}),t.preventDefault()):a.SearchViewModel.isCmdKeyPressed(t,a.SearchViewModel.KEY_G)?(e._resultFunctionOrSelect(function(e){return e.next()}),t.preventDefault()):t.which===a.SearchViewModel.KEY_Esc&&(e.props.searchViewModel.visible.set(!1),t.preventDefault())}),this.props.searchViewModel.visible.filter(Boolean).subscribe(function(){requestAnimationFrame(function(){e._title&&(e._title.focus(),e._title.select())})})))},t.prototype.componentWillUnmount=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},t.prototype._resultFunctionOrSelect=function(e){var t=this;this.props.searchViewModel.result.get().fold(function(){return t.props.searchViewModel.select()},e)},t.prototype.render=function(){var e=this,t=this.props.searchViewModel;return i.createElement("div",{className:l.view},i.createElement(o.F.div,{className:l.searchInputWrapper},i.createElement(u.Icon.SearchQuestion,{className:l.searchIcon}),i.createElement(o.F.input,r.__assign({name:a.SearchViewModel.SEARCH_INPUT_NAME,spellCheck:!1,mount:function(t){return e._title=t},placeholder:"Find in document",className:l.searchInput,autoFocus:!0},o.bind({value:t.term}),{onKeyDown:function(t){return t.keyCode===a.SearchViewModel.KEY_Enter&&e._resultFunctionOrSelect(function(e){return e.next()})}})),t.result.view(function(e){return e.getOrElse({count:0,current:0})}).view(function(e){var t=e.count,n=e.current;return t>0&&i.createElement("span",{className:l.counter,key:"count"},n,"/",t)})),i.createElement(s.Button.Round,{className:l.roundButton,name:"search-prev",disabled:t.result.view(function(e){return e.filter(function(e){return 1!==e.current}).isEmpty()}),onClick:function(){return e._resultFunctionOrSelect(function(e){return e.prev()})}},i.createElement(u.Icon.More,{className:l.lessIconUp})),i.createElement(s.Button.Round,{className:l.roundButton,name:"search-next",disabled:t.result.view(function(e){return e.filter(function(e){return e.current!==e.count}).isEmpty()}),onClick:function(){return e._resultFunctionOrSelect(function(e){return e.next()})}},i.createElement(u.Icon.More,{className:l.lessIcon})),i.createElement(s.Button.Round,{className:l.closeButton,name:"search-close",onClick:function(){return t.visible.set(!1)}},i.createElement(u.Icon.Close,null)))},t}(i.Component);t.SearchBarView=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._subs=[],t}return r.__extends(t,e),t.prototype.componentDidMount=function(){var e=this;this._subs.push(c.Observable.fromEvent(document,"keydown").filter(function(e){return a.SearchViewModel.isCmdKeyPressed(e,a.SearchViewModel.KEY_F)||a.SearchViewModel.isCmdKeyPressed(e,a.SearchViewModel.KEY_G)||a.SearchViewModel.isCmdShiftKeyPressed(e,a.SearchViewModel.KEY_G)}).subscribe(function(t){t.preventDefault(),0===e.context.visibleOverlays.get().size&&e.props.searchViewModel.visible.set(!0)}),this.context.visibleOverlays.filter(function(e){return e.size>0}).subscribe(function(){return e.props.searchViewModel.visible.set(!1)}))},t.prototype.componentWillUnmount=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},t.prototype.render=function(){var e=this;return i.createElement(o.F.div,{className:l.wrapper},this.props.searchViewModel.visible.view(function(t){return t&&i.createElement(p,{searchViewModel:e.props.searchViewModel})}))},t}(d.BaseComponent);t.SearchBar=f},1805:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(1488),a=n(1505),s=n(1545);t.CardComponent=function(e){var t=e.card,n=e.marksVM,l=e.cardsVM,c=e.pageVM,u=e.alignmentVM,d=function(){return i.createElement(a.Mini,{card:t,context:l.getContext(t.activeAlert),marksVM:n,pageViewModel:c})},p=function(){return i.createElement(s.Full,{card:t,marksViewModel:n,alignmentViewModel:u,cardsViewModel:l})};return i.createElement(o.BaseCard.Card,r.__assign({},{renderMiniCard:d,renderFullCard:p},{cardsViewModel:l,cardState:l.getState(t).map(function(e){return[t,e]})}))}},1806:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(14),a=n(7),s=n(122),l=n(1463),c=n(1480),u=n(1465),d=n(1461),p=n(1467),f=n(1643),h=n(573),m=n(1488),g=n(1505),v=n(1805),_=n(1546),b=n(1650),y=n(3),w=n(1529),E=u.Card.createFromAlert(new l.AlertImpl(l.Alert.generate(1),l.InternalAlertOps.mock,c.RangeManager.mock)),k=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._lensedVM=t.props.scrollVM.view(t.props.lens),t._lensAlertsCount=t.props.pageViewModel.state.takeWhile(u.LensState.is(t.props.lens.id)).map(u.LensState.mapper(function(e){var t=e.currentLens;return o.Some(t.meta.count)},function(e){var t=e.currentLens;return o.Some(t.meta.count)})).switchMap(y.RxUtils.toOptionValueOnly).startWith(t.props.lens.count),t._subs=[],t._activeEl=a.Atom.create(o.None),t._regularEl=a.Atom.create(o.None),t._setActive=function(e,n){return t._activeEl.set(o.Some({el:e,id:n}))},t._setRegular=function(e){return t._regularEl.set(o.Some(e))},t}return r.__extends(t,e),t.prototype.componentDidMount=function(){this.props.isMaster&&this._setMaster()},t.prototype.componentDidUpdate=function(){this.props.isMaster?this._setMaster():this._clearSubs()},t.prototype.componentWillUnmount=function(){this._clearSubs()},t.prototype.render=function(){var e=this,t=this.props,n=t.lens,o=t.marksVM,s=t.cardsVM,l=t.pageViewModel,c=t.alignmentVM,u=t.transition,b=t.onTransitionEnd;return i.createElement("div",{key:n.id,className:w.lensWrapper},i.createElement(a.F.div,r.__assign({},a.classes(u.map(function(e){return e.base}),w.headerWrapper),{onTransitionEnd:b}),i.createElement(_.SidebarHeader,{title:n.title,theme:{title:u.map(function(e){return e.title}),wrapper:w.header}},i.createElement(p.Small,{className:w.lensCounter},this._lensAlertsCount),i.createElement(d.Button.Round,{name:"dismiss-all",title:"Dismiss all",className:w.headerBtn,onClick:function(){n.dismissAll(),e.context.gnarSpec.dismissAllButtonClick(y.StringUtils.camelize(n.title),e.context.pageId)}},i.createElement(h.Icon.Ignore,null)))),i.createElement("div",{ref:function(t){return t&&(e._viewportEl=t)},className:w.viewport},i.createElement(a.F.div,r.__assign({},a.classes(w.lensviewContentWrapper,u.map(function(e){return e.base}))),i.createElement(a.F.div,r.__assign({},a.classes(w.scrollWrapper,u.map(function(e){return e.content}))),i.createElement(f.Scroller,{className:w.scroll,lensedVM:this._lensedVM,setActive:this._setActive,setRegular:this._setRegular,onMount:function(t){return t&&(e._scrollEl=t)},onTitleMount:function(t){return t&&(e._titleEl=t)},renderFake:function(){return i.createElement(m.BaseCard.Wrapper,{key:"fakeCard"},i.createElement(g.Mini,{card:E,context:s.getContext(E.activeAlert),marksVM:o,pageViewModel:l}))},renderCard:function(e){return i.createElement(v.CardComponent,{key:e.cardId,card:e,marksVM:o,cardsVM:s,pageVM:l,alignmentVM:c})}},i.createElement(p.P2,{className:w.info},n.description))))))},t.prototype._setMaster=function(){this._setSubs(),this._scrollEl&&(this._scrollEl.scrollTop=0,this._lensedVM.baseElements.scroll.set(o.Some(this._scrollEl))),this._viewportEl&&this._lensedVM.baseElements.viewport.set(o.Some(this._viewportEl)),this._titleEl&&this._lensedVM.baseElements.title.set(o.Some(this._titleEl))},t.prototype._setSubs=function(){var e=this;this._clearSubs(),this._subs.push(this._activeEl.subscribe(function(t){return t.map(function(t){var n=t.el,r=t.id;return e.props.scrollVM.updateBasic(n,{type:"active",id:r})})}),this._regularEl.subscribe(function(t){return t.map(function(t){return e.props.scrollVM.updateBasic(t,{type:"regular"})})}))},t.prototype._clearSubs=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},t}(s.BaseComponent);t.Lensview=k,function(e){e.Rechecking=function(e){var t=e.className;return i.createElement(a.F.div,r.__assign({key:"lensview-loader"},a.classes(t,w.rechecking)),i.createElement(b.LensviewLoader,null))}}(k=t.Lensview||(t.Lensview={})),t.Lensview=k},1807:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(122),s=n(123),l=n(1465),c=n(1704),u=n(1530),d=n(3),p=n(1485),f=n(1808),h=n(1809),m=function(e){var t=e.features,n=e.pageViewModel,r=e.minimized,o=e.criticalIssuesCount,a=e.advancedIssuesCount;return t.denali.counterType.fold(function(){return null},function(e){switch(e){case s.DenaliFeatures.CounterType.small:return i.createElement(h.IssueCounters,{pageViewModel:n,minimized:r,criticalIssuesCount:o,advancedIssuesCount:a,features:t});case s.DenaliFeatures.CounterType.large:return i.createElement(f.IssueCounters,{pageViewModel:n,minimized:r,criticalIssuesCount:o,advancedIssuesCount:a});default:return d.assertNever(e)}})},g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._criticalIssuesCount=t.props.documentModel.counters.view("critical"),t._advancedIssuesCount=t.props.documentModel.counters.view("advanced"),t._minimized=t.props.pageViewModel.sidebarOpened,t}return r.__extends(t,e),t.prototype._assistantProps=function(){var e=this;return{checking:this.props.documentModel.checkingState.view(function(e){return"idle"!==e}),minimized:this._minimized,hasErrors:o.Atom.combine(this._criticalIssuesCount,this._advancedIssuesCount,function(e,t){return e>0||t>0}),onClick:function(){e.context.gnarSpec.assistantOpenButtonClick(e.context.pageId,"default"),e.props.pageViewModel.switchTo(l.LensViewType.lensview)}}},t.prototype.render=function(){var e=this.props,t=e.features,n=e.pageViewModel;return i.createElement(o.F.section,{className:u.wrapper},i.createElement(m,{features:t,pageViewModel:n,minimized:this._minimized,criticalIssuesCount:this._criticalIssuesCount,advancedIssuesCount:this._advancedIssuesCount}),i.createElement(p.Onboarding,{key:"onboarding",alignment:"bottomLeft",eventType:"onclick",stepId:"step3",title:"Writing Assistant",message:"Open the Writing Assistant to see Premium alerts and organized feedback.",themes:{spotClassName:u.onboardingSpot}},i.createElement(c.AssistantButton,r.__assign({},this._assistantProps()))))},t}(a.BaseComponent);t.NewToggler=g},1808:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(13),i=n(7),o=n(122),a=n(1461),s=n(1521),l=n(1733),c=n(1530);t.IssueCounters=o.withContext(function(e,t){var n=e.pageViewModel,o=e.minimized,u=e.criticalIssuesCount,d=e.advancedIssuesCount,p=t.textResources,f=t.pageId,h=t.gnarSpec;return r.createElement(i.F.div,{className:o.view(function(e){return e?c.fadeOutCounters:c.counters})},u.view(function(e){return e>0?r.createElement(a.Button,{key:"critical-issues",name:"critical-issues",className:l.issuesWrapper,onClick:function(){h.assistantOpenButtonClick(f,"critical"),n.switchToCritical()}},r.createElement(s.Counters.Counter,{count:e,type:"red",theme:l}),1===e?p.denali.sidebar.criticalIssue:p.denali.sidebar.criticalIssues):null}),d.view(function(e){return e>0?r.createElement(a.Button,{key:"advanced-issues",name:"advanced-issues",className:l.issuesWrapper,onClick:function(){h.assistantOpenButtonClick(f,"advanced"),n.switchToAdvanced()}},r.createElement(s.Counters.Counter,{count:e,type:"yellow",theme:l}),1===e?p.denali.sidebar.advancedIssue:p.denali.sidebar.advancedIssues):null}))})},1809:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(13),i=n(7),o=n(122),a=n(312),s=n(1461),l=n(1734),c=n(1530);t.IssueCounters=o.withContext(function(e,t){var n=e.pageViewModel,o=e.minimized,u=e.criticalIssuesCount,d=e.advancedIssuesCount,p=e.features,f=t.textResources,h=t.pageId,m=t.gnarSpec,g=p.denali.alertGroupNames===a.AlertGroupNames.CRITICAL_ADVANCED?{critical:f.denali.sidebar.critical,advanced:f.denali.sidebar.advanced}:{critical:f.denali.sidebar.free,advanced:f.denali.sidebar.premium};return r.createElement(i.F.div,{className:o.view(function(e){return e?c.fadeOutCounters:c.counters})},u.view(function(e){return e>0?r.createElement(s.Button,{key:"critical-issues",name:"critical-issues",className:l.issuesWrapper,onClick:function(){m.assistantOpenButtonClick(h,"critical"),n.switchToCritical()}},r.createElement("span",{className:l.criticalCounter},e),r.createElement("span",null," ",g.critical)):null}),d.view(function(e){return e>0?r.createElement(s.Button,{key:"advanced-issues",name:"advanced-issues",className:l.issuesWrapper,onClick:function(){m.assistantOpenButtonClick(h,"advanced"),n.switchToAdvanced()}},r.createElement("span",{className:l.advancedCounter},e),r.createElement("span",null," ",g.advanced)):null}))})},1810:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(3),s=n(1463),l=n(573),c=n(1461),u=n(1483),d=n(1467),p=n(43),f=n(122),h=n(1735),m=["b","i","br"],g=function(e){return a.ReactUtils.setInnerHTML(e,{allowedTags:m})};t.Full=function(e){var t=e.state,n=e.card,a=e.pageViewModel,s=e.plagiarismViewModel,u=t.view("alerts");return i.createElement(o.F.div,{className:h.wrapper},i.createElement("div",{className:h.main},i.createElement("div",{className:h.plagiarismP2},i.createElement(o.F.span,{className:h.percent},u.switchMap(function(e){return s.getPercent(e)}),"%")," of your text matches this source:"),i.createElement(y,{alert:n.activeAlert}),i.createElement(c.Button.Round,{name:"ignore",title:"Dismiss",className:h.ignoreButton,onClick:function(){var e=u.get();e[0].dismissBatch(e)}},i.createElement(l.Icon.Ignore,null))),i.createElement(k,{alert:n.activeAlert}),u.view(function(e){return e.length>1&&i.createElement(x,r.__assign({key:"matches"},{state:t,pageViewModel:a}))}))};var v=f.withContext(function(e,t){var n=e.textToCopy,o=e.children,s=t.notifications;return i.createElement(c.Button.Flat,{key:"copy_title",name:"copy_title",title:"Click to copy",className:h.copyableReference,onClick:function(){return a.Clipboard.copy(n).then(function(){s.showMessage("Reference copied to clipboard")}).catch(function(){s.show(s.create.copyToClipboardFailed())})}},o,i.createElement("div",r.__assign({className:h.textToCopy},g(n))))}),_=function(e){var t=e.title,n=e.url;return i.createElement("div",r.__assign({},o.classes(h.plagiarismTitle)),i.createElement("div",r.__assign({},g(t))),n.map(function(e){return i.createElement(c.Button,{name:"url-button",href:e,target:"_blank",className:h.titleUrl},e)}).orNull())},b=function(e){var t=e.title,n=e.authors;return i.createElement("div",r.__assign({},o.classes(h.plagiarismTitle)),i.createElement("span",r.__assign({},g(t))),n.map(function(e){return i.createElement("span",null," ",i.createElement("span",{className:h.titleBy},"by")," ",i.createElement("span",r.__assign({},g(e))))}).orNull())},y=function(e){var t=e.alert;return"publication"===t.plagiarismType.source?i.createElement(b,{title:t.title,authors:t.plagiarismType.authors}):i.createElement(_,{title:t.title,url:t.plagiarismType.url})},w={mla:"MLA",apa:"APA",chicago:"Chicago"},E=Object.keys(w),k=function(e){var t=e.alert,n=o.Atom.create("mla");return"publication"===t.plagiarismType.source?i.createElement(o.F.div,{key:"publication",className:h.referenceWrapper},n.view(function(e){return[i.createElement(v,{key:"rf1"+e,textToCopy:t.plagiarismType.citationStyle[e]}),i.createElement("div",{className:h.referenceData},"Reference data – click to copy in  ",i.createElement(u.Dropdown,{vAlign:"top",name:"plagiarism",label:i.createElement(c.Button,{name:"citation-style-select",active:!1,className:h.citationStyleSelect},w[e]," ",i.createElement(l.Icon.CitationStyle,{className:h.citationStyleIcon})," ")},E.map(function(e){return i.createElement(c.Button.Flat,{className:h.citationStyleDdlButton,key:e,name:"citation-button-"+e,active:n.view(function(t){return t===e}),onClick:function(){return n.set(e)}},w[e])}))," format")]})):i.createElement("div",{key:"web",className:h.referenceWrapper},i.createElement(v,{textToCopy:t.title+t.plagiarismType.url.map(function(e){return". "+e}).getOrElse("")},i.createElement("div",{className:h.referenceData},"Reference data – click to copy")))},x=function(e){var t=e.state,n=e.pageViewModel;p.invariant(t&&t.get().alerts.length>0,"matches should contain at least one element");var r=t.view(function(e){return e.alerts[e.index]}),a=t.view("alerts"),u=t.lens("index");return i.createElement("div",null,i.createElement("div",{className:h.matchesContainer},i.createElement(o.F.div,{className:h.matchesContainerLeft},i.createElement(o.F.div,{className:h.matchesIndex},u.view(function(e){return e+1})),i.createElement(d.P2,null,"of ",a.view(function(e){return e.length})," matches")),i.createElement("div",{className:h.matchesContainerRight},i.createElement(c.Button.Caps,{className:h.leftButton,name:"left",disabled:u.view(function(e){return e<=0}),onClick:function(){u.modify(function(e){return Math.max(e-1,0)}),n.switchToAlert(r.get(),s.AlertActionSource.sidebar,"lensOrder")}},i.createElement(l.Icon.More,{className:h.leftButtonIcon}),"Previous"),i.createElement(c.Button.Caps,{name:"right",disabled:u.view(function(e){return e>=a.get().length-1}),onClick:function(){u.modify(function(e){return Math.min(e+1,a.get().length-1)}),n.switchToAlert(r.get(),s.AlertActionSource.sidebar,"lensOrder")}},"Next",i.createElement(l.Icon.More,{className:h.rightButtonIcon})))))}},1811:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(1488),s=n(3),l=n(1736);t.Mini=function(e){var t=e.cardId,n=e.getAlert,c=e.marksVM,u=e.pageViewModel,d=n();return i.createElement(a.BaseCard.Mini,r.__assign({cardId:t,getActiveAlert:n,className:l.dotPlagiarism},{marksVM:c,pageViewModel:u}),i.createElement("div",{className:l.wrapper},i.createElement("span",r.__assign({key:"title"},o.classes(l.text,"publication"===d.plagiarismType.source&&l.fullText)),d.title),"web"===d.plagiarismType.source?d.plagiarismType.url.map(s.StringUtils.urlToDomain).filter(s.notEmpty).map(function(e){return i.createElement("span",{key:"url",className:l.domain}," — ",e)}).orNull():d.plagiarismType.authors.map(function(e){return i.createElement("span",{key:"publication",className:l.publication}," — ",e)}).orNull()))}},1813:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(1501),a=n(1688),s=n(122),l=n(7),c=n(3),u=n(1706),d=n(1564),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(o.AnimationWrapper),f=function(e,t){var n=function(e){return e+" "+a.transitionDelay};return e&&e.type===d.SuccessLensViewModel.SuccessType.large&&t.type===d.SuccessLensViewModel.SuccessType.small?{prev:{start:{title:a.fadeOutEnd,firstLine:a.fadeOutEnd,secondLine:a.fadeOutEnd},end:{title:a.fadeOutEnd,firstLine:a.fadeOutEnd,secondLine:a.fadeOutEnd}},next:{start:{title:a.visible,firstLine:a.visible,secondLine:a.fadeInStart},end:{title:a.visible,firstLine:a.visible,secondLine:a.fadeInEnd}}}:e&&e.type===d.SuccessLensViewModel.SuccessType.small&&t.type===d.SuccessLensViewModel.SuccessType.large?{prev:{start:{title:a.fadeOutEnd,firstLine:a.fadeOutEnd,secondLine:a.fadeOutStart},end:{title:a.fadeOutEnd,firstLine:a.fadeOutEnd,secondLine:a.fadeOutEnd}},next:{start:{title:a.visible,firstLine:a.visible,secondLine:a.visible},end:{title:a.visible,firstLine:a.visible,secondLine:a.visible}}}:{prev:{start:{title:a.fadeOutStart,firstLine:a.fadeOutStart,secondLine:a.fadeOutStart},end:{title:a.fadeOutEnd,firstLine:a.fadeOutEnd,secondLine:a.fadeOutEnd}},next:{start:{title:n(a.fadeInStart),firstLine:n(a.fadeInStart),secondLine:n(a.fadeInStart)},end:{title:n(a.fadeInEnd),firstLine:n(a.fadeInEnd),secondLine:n(a.fadeInEnd)}}}};t.getStateText=function(e,t){var n=t.denali.successLens;switch(e){case d.SuccessLensViewModel.SuccessType.zero:return r.__assign({},n.emptyText,{type:d.SuccessLensViewModel.SuccessType.zero});case d.SuccessLensViewModel.SuccessType.small:return r.__assign({},n.smallText,{type:d.SuccessLensViewModel.SuccessType.small});case d.SuccessLensViewModel.SuccessType.large:return r.__assign({},n.largeText,{type:d.SuccessLensViewModel.SuccessType.large});case d.SuccessLensViewModel.SuccessType.applied:return{title:n.fixedText.titles[c.rand(9)],type:d.SuccessLensViewModel.SuccessType.applied};default:return c.assertNever(e)}},t.getBasicStateIllustration=function(e,t,n){switch(void 0===n&&(n=u.getIllustration()),e){case d.SuccessLensViewModel.SuccessType.zero:return i.createElement(n.NothingToCheck,{key:"nothing-to-check",animate:t});case d.SuccessLensViewModel.SuccessType.small:case d.SuccessLensViewModel.SuccessType.large:return i.createElement(n.NoIssuesFound,{key:"no-issues-found",animate:t});case d.SuccessLensViewModel.SuccessType.applied:return i.createElement(n.EverythingIsClear,{key:"everything-is-clear",animate:t});default:return c.assertNever(e)}},t.getStateIllustration=function(e,n,r){void 0===r&&(r=!0);var o=u.getIllustration();switch(e){case d.SuccessLensViewModel.SuccessType.zero:return n===d.SuccessLensViewModel.SuccessType.large||n===d.SuccessLensViewModel.SuccessType.small?i.createElement(o.NoIssueFoundToNothingToCheck,{key:"no-issue-found-to-nothing-to-check",animate:r}):t.getBasicStateIllustration(e,r,o);case d.SuccessLensViewModel.SuccessType.applied:return t.getBasicStateIllustration(e,r,o);case d.SuccessLensViewModel.SuccessType.large:case d.SuccessLensViewModel.SuccessType.small:return n===d.SuccessLensViewModel.SuccessType.zero?i.createElement(o.NothingToNoIssueFound,{key:"nothing-to-no-issue-found",animate:r}):t.getBasicStateIllustration(e,r&&n!==d.SuccessLensViewModel.SuccessType.large&&n!==d.SuccessLensViewModel.SuccessType.small,o);default:return c.assertNever(e)}},t.SuccessContainer=s.withContext(function(e,n){var o=e.state,s=e.preventAnimation,c=n.textResources,u=o.get();return i.createElement(l.F.div,{className:a.successContainer},o.pairwise().map(function(e){var n=e[0],r=e[1];return t.getStateIllustration(r,n,!s)}).startWith(t.getBasicStateIllustration(u,!s)),i.createElement(p,{className:a.animationWrapper,state:o.map(function(e){return t.getStateText(e,c)}),stateToClassMapper:f},function(e){var t=e.state,n=e.view;return i.createElement("div",{"data-name":"success-lens-text",key:t.type,className:a.textWrapper},i.createElement(l.F.div,r.__assign({key:"title"},l.classes(a.successTitle,n.map(function(e){return e.title}))),t.title),i.createElement("div",{className:a.successContent},i.createElement(l.F.div,{key:"firstLine",className:n.map(function(e){return e.firstLine})},t.firstLine),i.createElement(l.F.div,{key:"secondLine",className:n.map(function(e){return e.secondLine})},t.secondLine)))}))})},1814:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(23),a=n(14),s=n(7),l=n(6),c=n(575),u=n(122),d=n(1697),p=n(573),f=n(1461),h=n(1494),m=n(1692),g=n(1467),v=n(1481),_=n(3),b=n(211),y=n(1689),w=function(e){var t=e.value,n=e.children,r=e.dataName;return i.createElement("div",{className:y.halfRow,"data-name":r},i.createElement(g.P1,{className:y.number},t.toLocaleString()),i.createElement(g.P1,{className:y.numberTitle},n))},E=function(e){var t=e.value,n=e.children,r=e.dataName;return i.createElement("div",{className:y.halfRow,"data-name":r},i.createElement(g.P1,{className:y.time},b.convertTimeToShortString(t)),i.createElement(g.P1,{className:y.timeTitle},n))},k=function(e){var t=e.value,n=e.raw,r=e.children,o=e.dataName;return i.createElement("div",{className:y.row,"data-name":o},i.createElement(g.P1,{className:y.number},t),i.createElement(g.P1,{className:y.numberTitle},r),i.createElement(m.Progress,{value:n,className:y.progress,progressClass:y.progressStatistics}),i.createElement(m.Progress.Label,{value:n,className:y.progressLabel}))},x=function(e){var t=e.title;return i.createElement(f.InfoButton,{title:t,buttonClass:y.infoButton,iconClass:y.infoIcon,tooltipClass:y.descriptionTooltip})};t.StatisticsHeader=function(e){var n=e.stats;return i.createElement(v.Modal.Header,{className:y.modalHeader},i.createElement(t.Title,null),i.createElement("section",{className:y.headerBlock},i.createElement(w,{value:Math.max(n.chars-1,0)},"Characters"),i.createElement(E,{value:c.DocumentStatistics.calculateReadingTime(n)},"Reading time"),i.createElement(w,{value:n.words},"Words"),i.createElement(E,{value:c.DocumentStatistics.calculateSpeakingTime(n)},"Speaking time"),i.createElement(w,{value:n.sentences},"Sentences")))},t.StatisticsBody=u.withContext(function(e,t){var n=e.stats;return i.createElement(v.Modal.Body,null,i.createElement("section",{className:y.bodyBlock},i.createElement("div",{className:y.sectionHeaderWrapper},i.createElement("div",{className:y.sectionHeaderFont},"Vocabulary"),i.createElement(g.Small,null,"Metrics compared to other Grammarly users")),i.createElement(k,{value:Math.round(n.uniqueWords)+"%",raw:n.uniqueWordsIndex,dataName:"uniqueWords"},t.textResources.denali.documentStats.uniqueWordsTitle," ",i.createElement(x,{title:t.textResources.denali.documentStats.uniqueWords})),i.createElement(k,{value:Math.round(n.rareWords)+"%",raw:n.rareWordsIndex,dataName:"rareWords"},t.textResources.denali.documentStats.rareWordsTitle," ",i.createElement(x,{title:t.textResources.denali.documentStats.rareWords}))),i.createElement("section",{className:y.bodyBlock},i.createElement("div",r.__assign({},s.classes(y.sectionHeaderFont,y.sectionHeaderUnderline)),"Readability"),i.createElement(k,{value:Math.round(10*n.wordLength)/10,raw:n.wordLengthIndex,dataName:"wordLengthIndex"},t.textResources.denali.documentStats.wordLengthTitle),i.createElement(k,{value:Math.round(10*n.sentenceLength)/10,raw:n.sentenceLengthIndex,dataName:"sentenceLengthIndex"},t.textResources.denali.documentStats.sentenceLengthTitle),i.createElement(w,{value:Math.round(n.readabilityScore),dataName:"readability"},"Readability score ",i.createElement(x,{title:t.textResources.denali.documentStats.readability})),i.createElement("div",{className:y.row},i.createElement(g.P1,{className:y.number}," "),i.createElement(g.Small,{className:y.readabilityDescr},n.readabilityDescription))))});var S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._loadingState=s.Atom.create(t.props.statsLoadingState),t._buttonState=s.Atom.combine(t.props.reportViewModel.downloadStarted,t._loadingState,function(e,n){return t._getButtonState(e,n)}),t}return r.__extends(t,e),t.prototype._getButtonState=function(e,t){var n=this.context.textResources.denali.documentStats;return e?{disabled:!0,className:y.preparingForReportLabel,children:i.createElement("span",{className:y.loaderContainer},n.report.preparingPdfReport,i.createElement(h.Spinner,{size:20,variation:"blue",wrapperClassName:y.downloadPdfSpinner}),i.createElement(d.PDFReportGenerator,{reportViewModel:this.props.reportViewModel}))}:Object.assign({className:y.downloadPdfReportButton,children:i.createElement("span",null,i.createElement(p.Icon.Download,{className:y.downloadIcon}),n.report.downloadPdfReport)},t===C.READY?{disabled:!1}:{disabled:!0,title:t===C.SHORT_CONTENT?n.notEnoughTextToGenerateReport:void 0})},t.prototype.componentWillUnmount=function(){this.props.reportViewModel.tryToInterrupt()},t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.componentWillReceiveProps=function(e){var t=e.statsLoadingState;this._loadingState.set(t)},t.prototype.render=function(){return i.createElement(f.Button.Caps,{name:"download-pdf-report",title:this._buttonState.view("title"),className:this._buttonState.view("className"),disabled:this._buttonState.view("disabled"),onClick:this.props.reportViewModel.beginDownload},this._buttonState.view("children"))},t}(u.BaseComponent);t.DownloadPdfReportButton=S,t.StatisticsFooter=function(e){var t=e.close,n=e.reportViewModel,r=e.statsLoadingState;return i.createElement(v.Modal.Footer,null,i.createElement(S,{statsLoadingState:r,reportViewModel:n}),i.createElement(f.Button.Blue,{name:"close-stats",onClick:t},"Close"))},t.Title=function(e){var t=e.className;return i.createElement(g.H1,{className:t},"Document Insights")},t.StatisticsLoading=function(){return i.createElement(v.Modal.Body,{className:y.loaderHolder},i.createElement(t.Title,{className:y.loaderHeader}),i.createElement(h.Spinner,{size:64,className:y.loader,variation:"blue"}))};var C,M=function(){return i.createElement(v.Modal.Body,{className:y.loaderHolder},i.createElement(t.Title,{className:y.loaderHeader}))};!function(e){e[e.ERROR=0]="ERROR",e[e.EMPTY=1]="EMPTY",e[e.LOADING=2]="LOADING",e[e.SHORT_CONTENT=3]="SHORT_CONTENT",e[e.READY=4]="READY"}(C=t.StatsLoadingState||(t.StatsLoadingState={}));!function(e){e[e.DISABLED=0]="DISABLED",e[e.ACTIVE=1]="ACTIVE",e[e.DOWNLOADING=2]="DOWNLOADING",e[e.TOO_SHORT=3]="TOO_SHORT"}(t.DownloadButtonState||(t.DownloadButtonState={}));var A=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t._close=function(){t.props.visible.set(!1)},t}return r.__extends(n,e),n.prototype._getContent=function(e){switch(e.type){case C.ERROR:return[null];case C.EMPTY:return[i.createElement(M,{key:"empty"})];case C.LOADING:return[i.createElement(t.StatisticsLoading,{key:"loading"})];case C.READY:case C.SHORT_CONTENT:return[i.createElement(t.StatisticsHeader,{key:"header",stats:e.stats}),e.type===C.READY?i.createElement(t.StatisticsBody,{key:"body",stats:e.stats}):i.createElement(O,{key:"emptyBody"})];default:return _.assertNever(e)}},n.prototype.render=function(){var e=this,n=this.props,r=n.documentModel,s=n.reportViewModel;return i.createElement(v.Modal,{className:y.wrapper},o.Observable.combineLatest(_.RxUtils.promiseToStream(function(){return r.calculateStats()}),r.checkingState,function(e,t){return"idle"!==t?a.None:e}).switchMap(function(t){return t.map(function(t){return t.fold(function(t){return l.Monitoring.Logging.getLogger("editor.toolbar").error("Error on requesting document stats",t),e._close(),e.context.notifications.showMessage("Error on requesting document statistics. Please try again later."),o.Observable.of({type:C.ERROR})},function(e){return r.score.view(function(t){return{type:t.fold(function(){return C.SHORT_CONTENT},function(){return C.READY}),stats:e}})})}).getOrElse(o.Observable.of({type:C.LOADING}).delay(150))}).startWith({type:C.EMPTY}).map(function(n){return e._getContent(n).concat([i.createElement(t.StatisticsFooter,{key:"footer",statsLoadingState:n.type,reportViewModel:s,close:e._close})])}))},n}(u.BaseComponent);t.StatisticsView=A,t.StatisticsModal=function(e){var t=e.documentModel,n=e.reportViewModel,r=e.visible;return i.createElement("div",{className:y.statisticsWrapper},i.createElement(v.Overlay,{visible:r,animate:!0},i.createElement(A,{documentModel:t,visible:r,reportViewModel:n})))};var O=u.withContext(function(e,t){var n=t.textResources;return i.createElement("div",{className:y.emptyBodyContainer},i.createElement("svg",{width:"215",height:"89",viewBox:"0 0 192 80",xmlns:"http://www.w3.org/2000/svg"},i.createElement("g",{fill:"none",fillRule:"evenodd"},i.createElement("path",{stroke:"#E4E6F2",strokeWidth:"2",d:"M1.252 79.17l29.645-29.645L48.003 65.25l48.16-47.57 47.33 32.968 41.6-43.88"}),i.createElement("text",{stroke:"#FFF",strokeWidth:"5",fontFamily:"Times-Roman, Times",fontSize:"27",letterSpacing:"1.543",fill:"#FFF",transform:"translate(1)"},i.createElement("tspan",{x:"81.878",y:"54.439"},"T")),i.createElement("path",{d:"M108.284 8.288h-38.6c-1.105 0-2 .895-2 2v59.54c0 1.104.895 2 2 2h49.87c1.105 0 2-.896 2-2v-48.27l-13.27-13.27z",fill:"#D7ECFF"}),i.createElement("path",{d:"M181.277 43.362c1.293 4.55 4.85 8.108 9.4 9.4.724.205.724 1.23 0 1.436-4.55 1.293-8.107 4.85-9.4 9.4-.205.724-1.23.724-1.435 0-1.293-4.55-4.85-8.107-9.4-9.4-.723-.206-.723-1.23 0-1.435 4.55-1.293 8.107-4.85 9.4-9.4.206-.723 1.23-.723 1.435 0M43.148.542c1.293 4.55 4.85 8.108 9.4 9.4.723.205.723 1.23 0 1.436-4.55 1.293-8.107 4.85-9.4 9.4-.206.724-1.23.724-1.435 0-1.293-4.55-4.85-8.107-9.4-9.4-.724-.206-.724-1.23 0-1.435 4.55-1.293 8.107-4.85 9.4-9.4.206-.724 1.23-.724 1.435 0M11.102 26.576c.79 2.783 2.966 4.96 5.75 5.75.442.124.442.75 0 .877-2.784.79-4.96 2.966-5.75 5.75-.125.44-.75.44-.877 0-.79-2.784-2.966-4.96-5.75-5.75-.442-.126-.442-.753 0-.878 2.784-.79 4.96-2.966 5.75-5.75.126-.44.752-.44.877 0M153.376 7.238c.79 2.783 2.966 4.96 5.75 5.75.44.124.44.75 0 .877-2.784.79-4.96 2.966-5.75 5.75-.126.44-.752.44-.878 0-.79-2.784-2.966-4.96-5.75-5.75-.44-.126-.44-.753 0-.878 2.784-.79 4.96-2.966 5.75-5.75.126-.44.752-.44.878 0",fill:"#F9E799"}),i.createElement("path",{fill:"#A4D3FF",opacity:".5",className:y.emptyBodySvgPath,d:"M107.74 8.288L121.555 22.1H107.74"}),i.createElement("path",{d:"M79.424 30.388h30.39M79.424 41.44h30.39M79.424 52.49h30.39",stroke:"#FFF",strokeWidth:"2",strokeLinecap:"round"}),i.createElement("path",{fill:"#E4E6F2",d:"M174.043 8.09l13.813-3.946-3.946 13.813"}))),i.createElement(g.Paper,{className:y.emptyBodyText},n.denali.documentStats.notEnoughTextToCalculateStats))})},1815:function(e,t,n){"use strict";var r=this;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(13),a=n(24),s=n(23),l=n(7),c=n(6),u=n(122),d=n(3),p=n(1540),f=n(1465),h=n(1467),m=n(1461),g=n(573),v=n(1541),_=n(1904);t.Saved=function(e){var t=e.documentModel,n=e.classes;return o.createElement(h.Small,{key:"saved-wrapper",name:"save-status",className:t.saved.startWith(!1).audit(function(e){return s.Observable.timer(e?1e3:0)}).map(function(e){return e?n.saved:n.notSaved})},o.createElement(l.F.span,{"data-saved":t.saved.startWith(!0)}),"Saved")},t.InActions=u.withContext(function(e,t){var n=e.uploadViewModel,r=t.gnarSpec,i=t.appRouter,a=t.pageId,s=t.textResources;return o.createElement("div",{className:_.actionBlockWrapper},o.createElement(m.Button.Flat,{name:"new",key:"new",onClick:function(){r.newDocumentDenaliButtonClick(a),i.navigate(u.Router.routes.new_document.href({}))}},o.createElement(g.Icon.New,null),"New document"),o.createElement(m.Button.Flat,{name:"upload",key:"upload"},o.createElement(g.Icon.Download,{className:_.uploadIcon}),s.denali.uploadMenuItem,o.createElement(p.UploadElement,{documentUpload:n.uploadModel,browser:n.browser,hideTooltip:!0})))}),t.OutActions=u.withContext(function(e,t){var n=e.documentModel,a=t.gnarSpec,s=t.pageId,l=t.textResources,u=t.notifications;return o.createElement("div",{className:_.actionBlockWrapper},o.createElement(m.Button.Flat,{name:"download",key:"download",onClick:function(){return i.__awaiter(r,void 0,void 0,function(){return i.__generator(this,function(e){switch(e.label){case 0:return a.downloadButtonClick(s),[4,n.downloadOriginal()];case 1:return e.sent(),[2]}})})}},o.createElement(g.Icon.Download,null),l.denali.downloadMenuItem),o.createElement(m.Button.Flat,{name:"print",key:"print",onClick:function(){setTimeout(window.print,200),a.printButtonClick(s)}},o.createElement(g.Icon.Print,null),"Print"),o.createElement(m.Button.Flat,{name:"copy",key:"copy",onClick:function(){d.Clipboard.copy(n.documentText).then(function(){u.showMessage("Document copied to clipboard")}).catch(function(e){d.Clipboard.copyApiAvailable.set(!1),u.show(u.create.copyToClipboardFailed()),c.Monitoring.Logging.getLogger("clipboard").warn("Copy to clipboard failed",e)}),a.copyToClipboardButtonClick(s)}},o.createElement(g.Icon.Copy,null),"Copy to clipboard"))}),t.ToHomeBase=u.withContext(function(e,t){var n=e.onClick,r=void 0===n?function(){return s.navigate(u.Router.routes.documents.href({}))}:n,i=e.hideTooltip,a=void 0===i?l.Atom.create(!1):i,s=t.appRouter;return o.createElement(m.Button.Round,{name:"to-home",onClick:r,title:a.view(function(e){return e?void 0:"Back to My Grammarly"}),className:_.toolbarBtn},o.createElement(g.Icon.More,{className:_.backIcon}),o.createElement(g.Icon.Library,null))});var b=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r._isOnExitNotificationVisible=l.Atom.create(!1),r._unreviewedAlertsCount=r.props.sidebarViewModel.lenses.view(function(e){return e.reduce(function(e,t){return e+t.unreadCount},0)}),r._subs=[],r._toHomeClick=function(){return r.context.appRouter.navigate(u.Router.routes.documents.href({}))},r._onboardingViewModel=n.onboardingViewModel,d.invariant(Boolean(r._onboardingViewModel),"onboardingViewModel should be in context"),r._isOnExitNotificationEnabled=l.Atom.create(!r.props.documentModel.extraSettings.discoverabilityOnExitShown&&r.props.settingsModel.showExitNotification.get()||r.props.featuresModel.showDiscoverabilityOnExit),r}return i.__extends(n,e),n.prototype.componentDidMount=function(){var e=this;this._subs.push(this.props.pageViewModel.sidebarOpened.filter(Boolean).first().subscribe(function(){e._isOnExitNotificationEnabled.set(!1),e._isOnExitNotificationVisible.set(!1)}),this._isOnExitNotificationVisible.skip(1).subscribe(function(t){return e._onboardingViewModel.changeState(!t)}),this._isOnExitNotificationVisible.filter(Boolean).first().subscribe(function(t){return e.props.documentModel.extraSettings.discoverabilityOnExitShown=!0}))},n.prototype.componentWillUnmount=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._onboardingViewModel.changeState(!0)},n.prototype._saveSettings=function(e,t){e||this.props.settingsModel.updateExitNotification(e),t()},n.prototype.render=function(){var e=this;return o.createElement(l.F.div,null,o.createElement(t.ToHomeBase,{hideTooltip:this._isOnExitNotificationVisible,onClick:function(){e._isOnExitNotificationEnabled.get()&&e._unreviewedAlertsCount.get()>0&&!e._isOnExitNotificationVisible.get()?(e._isOnExitNotificationEnabled.set(!1),e._isOnExitNotificationVisible.set(!0)):e._toHomeClick()}}),this._isOnExitNotificationVisible.view(function(t){return t&&o.createElement(v.DiscoverabilityOnExit,{themes:e.props.discoverabilityOnExitThemes,key:"discoverability-on-exit","data-name":"discoverability-on-exit",unreviewedAlertsCount:e._unreviewedAlertsCount,onExitClick:function(t){return e._saveSettings(t,e._toHomeClick)},onReviewClick:function(t){return e._saveSettings(t,function(){e.props.pageViewModel.switchTo(f.LensViewType.lensview),e._isOnExitNotificationVisible.set(!1)})}})}))},n.contextTypes=i.__assign({},u.BaseComponent.contextTypes,{onboardingViewModel:a.object}),n}(u.BaseComponent);t.ToHome=b},1816:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(14),a=n(7),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._tourModal=a.Atom.create(o.Option.empty()),t}return r.__extends(t,e),t.prototype.componentDidMount=function(){var e=this;(new Image).src=n(1690),n.e(9).then(n.bind(null,1877)).then(function(t){var n=t.TourInit;e._tourModal.set(o.Some(i.createElement(n,{type:e.props.type,settings:e.props.settings,onReady:function(){return e.props.tourLoaded.set(!0)}})))})},t.prototype.render=function(){return i.createElement(a.F.div,null,this._tourModal.view(function(e){return e.orNull()}))},t}(i.Component);t.TourWrapper=s},1826:function(e,t,n){t=e.exports=n(1474)(),t.push([e.i,"._919eba06-components-checkMark{display:inline-block;margin-right:11.9px;margin-bottom:6.8px;width:27.2px;height:27.2px;vertical-align:middle}",""]),t.locals={checkMark:"_919eba06-components-checkMark"}},1827:function(e,t,n){t=e.exports=n(1474)(),t.push([e.i,"._c8b13784-components-radialProgressBar{width:120.7px;height:120.7px;font-weight:700;-webkit-transform:translateX(-10.2px);transform:translateX(-10.2px);fill:#2b2d38}._2125236f-components-progress{font-size:20px}._4d16220d-components-description{font-weight:400;font-size:11px;fill:#8189a9}",""]),t.locals={radialProgressBar:"_c8b13784-components-radialProgressBar",progress:"_2125236f-components-progress",description:"_4d16220d-components-description"}},1828:function(e,t,n){t=e.exports=n(1474)(),t.push([e.i,"._0255efa9-report-invisible{position:absolute;visibility:hidden}._9de326bd-report-content{box-sizing:border-box;margin:0 -8px;padding-right:74.8px;padding-left:244.8px;width:1190px;font-family:Akkurat Std;-webkit-font-smoothing:antialiased}._9de326bd-report-content thead{display:table-row-group}._66f3de2a-report-separatorRemover{position:fixed;top:0;width:100%;height:3px;background-color:#fff}",""]),t.locals={invisible:"_0255efa9-report-invisible",content:"_9de326bd-report-content",separatorRemover:"_66f3de2a-report-separatorRemover"}},1829:function(e,t,n){t=e.exports=n(1474)(),t.i(n(1551),void 0),t.push([e.i,"._7347da36-sections-insightsSection:not(:first-child){margin-top:40.8px}._bedfea4c-sections-insightTable{margin-top:40.8px;width:870.4px}._f0af9adb-sections-insightHeader{letter-spacing:0;font-weight:700;font-size:30.6px;line-height:54.4px}._2b1979d3-sections-insightBody{color:#8189a9;letter-spacing:.187px;font-size:22.1px;line-height:34px}._4f0695c3-sections-insightTextCell{padding-right:54.4px;width:545.7px}._73ab2a36-sections-insightTextHeader{text-transform:capitalize}._fa63635f-sections-insightScoreCell{width:324.7px;vertical-align:top;text-transform:lowercase}._ced96f3e-sections-insightScore{color:#4c7af1;letter-spacing:-.17px}",""]),t.locals={insightsSection:"_7347da36-sections-insightsSection "+n(1551).locals.section,insightTable:"_bedfea4c-sections-insightTable "+n(1551).locals.genericTable,insightHeader:"_f0af9adb-sections-insightHeader",insightBody:"_2b1979d3-sections-insightBody",insightTextCell:"_4f0695c3-sections-insightTextCell",insightTextHeader:"_73ab2a36-sections-insightTextHeader _4f0695c3-sections-insightTextCell",insightScoreCell:"_fa63635f-sections-insightScoreCell",insightScore:"_ced96f3e-sections-insightScore _fa63635f-sections-insightScoreCell"}},1830:function(e,t,n){t=e.exports=n(1474)(),t.push([e.i,"._61170574-sections-section{border-top:1px solid #e4e6f2;page-break-inside:avoid}._e4e9aea5-sections-sectionHeader{margin-top:40.8px;color:#2b2d38;letter-spacing:0;font-weight:700;font-size:30.6px;line-height:54.4px}._a3d49063-sections-genericTable{width:100%;table-layout:fixed;text-align:left}._f9980777-sections-text{color:#8189a9;letter-spacing:.187px;font-size:22.1px;line-height:34px}._41339ef9-sections-generalMetricsSection{margin-bottom:23.8px}._ad9477ed-sections-generalMetricsHeader{margin:39.1px 0 6.8px}._41339ef9-sections-generalMetricsSection table{width:100%;white-space:nowrap}._41339ef9-sections-generalMetricsSection tbody{vertical-align:top}._cd7ec05c-sections-metrics{color:#4c7af1;letter-spacing:0;font-weight:700;font-size:25.5px;line-height:39.1px}._cd7ec05c-sections-metrics td{width:21.875%}",""]),t.locals={section:"_61170574-sections-section",sectionHeader:"_e4e9aea5-sections-sectionHeader",genericTable:"_a3d49063-sections-genericTable",text:"_f9980777-sections-text",generalMetricsSection:"_41339ef9-sections-generalMetricsSection _61170574-sections-section",generalMetricsHeader:"_ad9477ed-sections-generalMetricsHeader _e4e9aea5-sections-sectionHeader",metrics:"_cd7ec05c-sections-metrics"}},1831:function(e,t,n){t=e.exports=n(1474)(),t.push([e.i,"._84028050-sections-section{border-top:1px solid #e4e6f2;page-break-inside:avoid}._22ec0fa8-sections-sectionHeader{margin-top:40.8px;color:#2b2d38;letter-spacing:0;font-weight:700;font-size:30.6px;line-height:54.4px}._f3ba09e5-sections-genericTable{width:100%;table-layout:fixed;text-align:left}._c2ae9678-sections-text{color:#8189a9;letter-spacing:.187px;font-size:22.1px;line-height:34px}._66aa1bf7-sections-plagiarismSection{page-break-after:always}._75498e4e-sections-plagiarismSectionHeader{margin:39.1px 0 17px}._3c9846da-sections-original{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}._188a3ea7-sections-plagiarismMark{margin-right:.8rem}._93239183-sections-score{width:21.875%}._80f5a5fd-sections-percent{margin-top:0;width:108.8px;text-align:center}._2a6c308d-sections-sources{padding-top:47.6px;padding-bottom:0;width:78.125%;vertical-align:top}._f769f942-sections-sourcesCount{color:#2b2d38;letter-spacing:0;font-weight:700;font-size:30.6px;line-height:30.6px}._09622601-sections-scoreDescription{padding-top:17px;white-space:pre-line}",""]),t.locals={section:"_84028050-sections-section",sectionHeader:"_22ec0fa8-sections-sectionHeader",genericTable:"_f3ba09e5-sections-genericTable",text:"_c2ae9678-sections-text",plagiarismSection:"_66aa1bf7-sections-plagiarismSection _84028050-sections-section",plagiarismSectionHeader:"_75498e4e-sections-plagiarismSectionHeader _22ec0fa8-sections-sectionHeader",original:"_3c9846da-sections-original _c2ae9678-sections-text",plagiarismMark:"_188a3ea7-sections-plagiarismMark",score:"_93239183-sections-score _c2ae9678-sections-text",percent:"_80f5a5fd-sections-percent",sources:"_2a6c308d-sections-sources _c2ae9678-sections-text",sourcesCount:"_f769f942-sections-sourcesCount",scoreDescription:"_09622601-sections-scoreDescription _c2ae9678-sections-text"}},1832:function(e,t,n){t=e.exports=n(1474)(),t.push([e.i,"._07014980-sections-section{border-top:1px solid #e4e6f2;page-break-inside:avoid}._cd19cac7-sections-sectionHeader{margin-top:40.8px;color:#2b2d38;letter-spacing:0;font-weight:700;font-size:30.6px;line-height:54.4px}._5892157f-sections-genericTable{width:100%;table-layout:fixed;text-align:left}._3acbd539-sections-text{color:#8189a9;letter-spacing:.187px;font-size:22.1px;line-height:34px}._308e79e3-sections-scoreTable{margin:37.4px 0 8.5px}._308e79e3-sections-scoreTable th{padding-bottom:11.9px}._308e79e3-sections-scoreTable ._58adb618-sections-score{width:43.75%}._308e79e3-sections-scoreTable ._dac1af35-sections-writingIssues{width:56.25%}._3fea7cf9-sections-issuesSummary{display:-webkit-flex;display:flex;vertical-align:top;-webkit-align-items:center;align-items:center}._3fea7cf9-sections-issuesSummary span{padding-left:.8rem}._044e09da-sections-issueCounters{padding-top:51px;white-space:nowrap}._02551a77-sections-issueCounter{letter-spacing:.34px;font-weight:700;font-size:25.5px;line-height:32.3px}._7feaa693-sections-issuesLeftBlock{display:inline-block}._4648b58c-sections-total{width:38.88%}._4648b58c-sections-total ._02551a77-sections-issueCounter{color:#2b2d38;letter-spacing:0;font-size:30.6px}._10e6403b-sections-critical{width:38.88%}._10e6403b-sections-critical ._02551a77-sections-issueCounter{color:#f23452}._5ae4183f-sections-advanced{width:22.24%}._5ae4183f-sections-advanced ._02551a77-sections-issueCounter{color:#f6bc41}",""]),t.locals={section:"_07014980-sections-section",sectionHeader:"_cd19cac7-sections-sectionHeader",genericTable:"_5892157f-sections-genericTable",text:"_3acbd539-sections-text",scoreTable:"_308e79e3-sections-scoreTable _5892157f-sections-genericTable",score:"_58adb618-sections-score",writingIssues:"_dac1af35-sections-writingIssues",issuesSummary:"_3fea7cf9-sections-issuesSummary _3acbd539-sections-text",issueCounters:"_044e09da-sections-issueCounters _3fea7cf9-sections-issuesSummary _3acbd539-sections-text",issueCounter:"_02551a77-sections-issueCounter",issuesLeftBlock:"_7feaa693-sections-issuesLeftBlock",total:"_4648b58c-sections-total _7feaa693-sections-issuesLeftBlock",critical:"_10e6403b-sections-critical _7feaa693-sections-issuesLeftBlock",advanced:"_5ae4183f-sections-advanced _7feaa693-sections-issuesLeftBlock"}},1833:function(e,t,n){t=e.exports=n(1474)(),t.push([e.i,"._ab135555-sections-author{color:#8189a9;letter-spacing:0;font-size:25.5px;line-height:40.8px}._bdd4d656-sections-titleSection{margin-bottom:37.4px;page-break-inside:avoid}._69afb945-sections-title{display:-webkit-box;overflow:hidden;color:#2b2d38;word-wrap:break-word;hyphens:auto;font-weight:700;-webkit-line-clamp:5;-webkit-box-orient:vertical}._d3f6e34d-sections-largeTitle{margin-bottom:37.4px;font-size:47.6px;line-height:68px}._85cce117-sections-mediumTitle{font-size:37.4px;line-height:54.4px}._b56c7aba-sections-smallTitle{font-size:30.6px;line-height:54.4px}._b0f2eecb-sections-titleContainer{overflow:hidden;text-overflow:ellipsis}",""]),t.locals={author:"_ab135555-sections-author",titleSection:"_bdd4d656-sections-titleSection",title:"_69afb945-sections-title",largeTitle:"_d3f6e34d-sections-largeTitle _69afb945-sections-title",mediumTitle:"_85cce117-sections-mediumTitle _69afb945-sections-title",smallTitle:"_b56c7aba-sections-smallTitle _69afb945-sections-title",titleContainer:"_b0f2eecb-sections-titleContainer"}},1834:function(e,t,n){t=e.exports=n(1474)(),t.push([e.i,"._f2afcbbf-sections-section{border-top:1px solid #e4e6f2;page-break-inside:avoid}._880230dc-sections-sectionHeader{margin-top:40.8px;color:#2b2d38;letter-spacing:0;font-weight:700;font-size:30.6px;line-height:54.4px}._1c79d012-sections-genericTable{width:100%;table-layout:fixed;text-align:left}._ebb0092e-sections-text{color:#8189a9;letter-spacing:.187px;font-size:22.1px;line-height:34px}._b662ac32-sections-writingIssuesSection{border-top:1px solid #e4e6f2}._025a1d14-sections-writingIssuesTable{position:relative;margin-bottom:37.4px;width:742.9px}._025a1d14-sections-writingIssuesTable td,._025a1d14-sections-writingIssuesTable th{vertical-align:top;page-break-inside:avoid}._7a588869-sections-issueHeader{page-break-after:avoid}._20b5aa1e-sections-categoryAmount{width:54.4px;font-weight:700;line-height:37.4px}._ab35c199-sections-issueAmount{padding-right:17px;color:#f43c5c;text-align:right;font-weight:700;font-size:22.1px;line-height:40.8px}._46639b12-sections-circle{margin-left:10.2px;width:34px;height:34px;border-radius:17px;background:#f23452;color:#fff;text-align:center;font-size:20.4px;line-height:34px}._72d626ea-sections-oval{width:40.8px}._8b026d73-sections-generalTitle{padding-left:37.4px;width:498.1px;color:#2b2d38;letter-spacing:0;font-size:23.8px;line-height:40.8px}._a718cee7-sections-issueTitle{text-transform:lowercase;font-weight:400}._a718cee7-sections-issueTitle:first-letter{text-transform:capitalize}._570fc18b-sections-categoryTitle{font-weight:700}._374c5f78-sections-fakeHeader{position:absolute;top:0;left:0;width:100%;background:#fff;line-height:40.8px}._14b7d401-sections-progressBarCell{width:190.4px}._59ca7f05-sections-issueProgressBar{margin-top:20.4px;min-width:8.5px;height:8.5px;border-radius:10.2px;background:linear-gradient(90deg,#ff6d8d,#ff2c5f);box-shadow:0 0 0 5.1px #fff}._6a76cb38-sections-temporaryHeader,._b3fb8f90-sections-issueContent{page-break-inside:avoid}._ac5f465a-sections-progressBarBg{width:100%;border-radius:10.2px;background-color:#f1f2fa}",""]),t.locals={section:"_f2afcbbf-sections-section",sectionHeader:"_880230dc-sections-sectionHeader",genericTable:"_1c79d012-sections-genericTable",text:"_ebb0092e-sections-text",writingIssuesSection:"_b662ac32-sections-writingIssuesSection",writingIssuesTable:"_025a1d14-sections-writingIssuesTable _1c79d012-sections-genericTable",issueHeader:"_7a588869-sections-issueHeader",categoryAmount:"_20b5aa1e-sections-categoryAmount",issueAmount:"_ab35c199-sections-issueAmount",circle:"_46639b12-sections-circle",oval:"_72d626ea-sections-oval _46639b12-sections-circle",generalTitle:"_8b026d73-sections-generalTitle",issueTitle:"_a718cee7-sections-issueTitle _8b026d73-sections-generalTitle",categoryTitle:"_570fc18b-sections-categoryTitle _8b026d73-sections-generalTitle",fakeHeader:"_374c5f78-sections-fakeHeader",progressBarCell:"_14b7d401-sections-progressBarCell",issueProgressBar:"_59ca7f05-sections-issueProgressBar",issueContent:"_b3fb8f90-sections-issueContent",temporaryHeader:"_6a76cb38-sections-temporaryHeader",progressBarBg:"_ac5f465a-sections-progressBarBg"}},1840:function(e,t,n){e.exports=n(1826),e.exports.locals&&(e.exports.locals.__$extract=n(1479)(e.exports))},1841:function(e,t,n){e.exports=n(1827),e.exports.locals&&(e.exports.locals.__$extract=n(1479)(e.exports))},1842:function(e,t,n){e.exports=n(1828),e.exports.locals&&(e.exports.locals.__$extract=n(1479)(e.exports))},1843:function(e,t,n){e.exports=n(1829),e.exports.locals&&(e.exports.locals.__$extract=n(1479)(e.exports))},1844:function(e,t,n){e.exports=n(1830),e.exports.locals&&(e.exports.locals.__$extract=n(1479)(e.exports))},1845:function(e,t,n){e.exports=n(1831),e.exports.locals&&(e.exports.locals.__$extract=n(1479)(e.exports))},1846:function(e,t,n){e.exports=n(1832),e.exports.locals&&(e.exports.locals.__$extract=n(1479)(e.exports))},1847:function(e,t,n){e.exports=n(1833),e.exports.locals&&(e.exports.locals.__$extract=n(1479)(e.exports))},1848:function(e,t,n){e.exports=n(1834),e.exports.locals&&(e.exports.locals.__$extract=n(1479)(e.exports))},1866:function(e,t){e.exports={sidebarTier:"_5b2fcdfb-view-sidebarTier",fullHeight:"_443b48a8-view-fullHeight",sidebarWrapper:"_5ba8c704-view-sidebarWrapper _443b48a8-view-fullHeight",wrapper:"_897daef8-view-wrapper",loaderWrapper:"_5757827f-view-loaderWrapper _897daef8-view-wrapper",loaderWithToolbar:"_4109509f-view-loaderWithToolbar",fadedWrapper:"_c9dba2a5-view-fadedWrapper _897daef8-view-wrapper",hiddenWrapper:"_c7b98097-view-hiddenWrapper",actionsWrapper:"_8e0b9da9-view-actionsWrapper",lensLeaveStart:"_471edbd1-view-lensLeaveStart",lensLeaveStartTitle:"_97758504-view-lensLeaveStartTitle",lensLeaveStartContent:"_f4517067-view-lensLeaveStartContent",lensLeave:"_f756a620-view-lensLeave",lensLeaveTitle:"_11a4a97e-view-lensLeaveTitle",lensMoveDown:"_822be806-view-lensMoveDown",lensMoveUp:"_d2439f64-view-lensMoveUp",lensLeaveContent:"_0f90200e-view-lensLeaveContent",lensHideStart:"_93b6c01e-view-lensHideStart",lensHide:"_af9165ac-view-lensHide _93b6c01e-view-lensHideStart",lensEnter:"_be08d7ab-view-lensEnter",lensEnterTitle:"_15d8f8e3-view-lensEnterTitle",lensEnterContent:"_3e65bbd9-view-lensEnterContent",lensEnterStart:"_be2f41c3-view-lensEnterStart",lensEnterStartTitle:"_b06f2f6d-view-lensEnterStartTitle",lensEnterStartContent:"_12c9832c-view-lensEnterStartContent",stateLeave:"_326925bb-view-stateLeave",up:"_8892dd51-view-up",down:"_0e2dffe8-view-down",stateLeaveStart:"_088f6024-view-stateLeaveStart",stateEnter:"_095e0cf8-view-stateEnter",stateEnterStart:"_4548b990-view-stateEnterStart",sidebarEnterLeft:"_a6140d6a-view-sidebarEnterLeft",sidebarEnterLeftStart:"_ccc19bc5-view-sidebarEnterLeftStart",sidebarLeaveRight:"_0c0b9e69-view-sidebarLeaveRight",sidebarLeaveRightStart:"_626a800b-view-sidebarLeaveRightStart",navigationEnterLeft:"_63e96736-view-navigationEnterLeft",navigationEnterLeftStart:"_0df65d85-view-navigationEnterLeftStart",navigationLeaveRight:"_a4bba7e4-view-navigationLeaveRight",navigationLeaveRightStart:"_42e709a5-view-navigationLeaveRightStart"}},1871:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(2),o=n(124),a=n(122),s=n(574),l=n(3);!function(e){!function(e){e.idle="idle",e.loading="loading",e.uploaded="uploaded"}(e.State||(e.State={}))}(r=t.UploadViewModel||(t.UploadViewModel={}));var c=function(){function e(e,t,n,i,o){var c=this;this._doxApi=e,this._appRouter=t,this._notifications=n,this._telemetry=i,this.browser=o,this.uploadModel=new s.DocumentUpload.UploadModel(function(e){return c._upload(e)},function(e,t){c._appRouter.navigate(a.Router.routes.denali_editor.href({docId:e}),{showDocumentUploadedNotification:!t||t.showDocumentUploadedNotification,openSidebar:!0})},this._notifications,this._telemetry),this.state=this.uploadModel.state.pairwise().map(function(e){var t=e[0],n=e[1];return l.Async.isInProgress(n)?r.State.loading:l.Async.isOk(n)||l.Async.isIdle(n)&&l.Async.isOk(t)?r.State.uploaded:r.State.idle}).startWith(r.State.idle),l.registerDebugHelper("showUploadNotification",function(){return c._showUploadNotification()})}return e.prototype.showUploadNotificationIfNeeded=function(){var e=this;this._appRouter.locationState.forEach(function(t){!0===t.showDocumentUploadedNotification&&e._showUploadNotification()})},e.prototype._showUploadNotification=function(){var e=this;this._notifications.show(this._notifications.create.denaliDocumentUploaded(function(){return e._appRouter.navigate(a.Router.routes.documents.href({}))}))},e.prototype._upload=function(e){return i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(t){switch(t.label){case 0:return[4,this._doxApi.createDocument(o.DoxRequest.Create.file(e))];case 1:return[2,t.sent()]}})})},e}();t.UploadViewModelImpl=c},1872:function(e,t,n){"use strict";function r(e){var t=i.__assign({},h);return e.denali.emptyTitle&&(t.scrollWrap=m.scrollWrap,t.editorContentWrap=m.editorContentWrap),e.denali.horizontalToolbar&&(t.editorContent=g.editorContent,t.editorComponentWrapperSqueezed=g.editorComponentWrapperSqueezed),t}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(13),a=n(23),s=n(7),l=n(1476),c=n(3),u=n(122),d=n(1477),p=n(1489),f=n(1891),h=n(1888),m=n(1889),g=n(1890);t.ToolbarTitle=u.withContext(function(e,t){var n=e.denaliEditor,r=e.documentModel,a=e.features,l=e.onMount,c=t.screen,u=t.gnarSpec,d=t.pageId;return o.createElement("div",i.__assign({},s.classes(h.toolbarTitleContainer,a.denali.halfSidebar&&h.toolbarShifted),{ref:function(e){return e&&l&&l(e)}}),o.createElement(s.F.h3,{"data-name":"toolbar-title",className:n.scrollPosition.combineLatest(c.remSize).map(function(e){return e[0]>3.45*e[1]}).startWith(!1).distinctUntilChanged().map(function(e){return e?h.toolbarTitleVisible:h.toolbarTitleHidden}),onClick:function(){u.newTitleButtonClick(d),n.scrollToTitle()}},r.title.view(function(e){return e||"Untitled"})))});var v=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t._subs=[],t._viewportPadding=s.Atom.create(d.ViewportPadding.empty),t.onScroll=new a.Subject,t._textTransition=t.props.pageViewModel.sidebarOpened.skip(1).withLatestFrom(t.props.pageViewModel.textInProcessing).switchMap(function(e){var t=e[0];return e[1]?a.Observable.of(t?f.toWritingEnd:f.toEditingEnd):c.Animation.rafSequence(t?[f.toWritingStart,f.toWritingStart,f.toWritingEnd]:[f.toEditingStart,f.toEditingStart,f.toEditingEnd],!0)}).startWith(void 0),t._transitionEnd=new a.Subject,t}return i.__extends(n,e),n.prototype.componentDidMount=function(){var e=this,t=this.props.viewport;t.set(this._scroll.getBoundingClientRect()),this._subs.push(a.Observable.merge(this._transitionEnd,a.Observable.fromEvent(window,"resize")).debounceTime(200).switchMap(c.RxUtils.Scheduler.rafScheduler).subscribe(function(){return t.set(e._scroll.getBoundingClientRect())}),this.context.screen.remSize.subscribe(function(){e.props.denaliEditor.viewport.forEach(function(t){var n=e._titleEl.offsetHeight,r=t.left;e._viewportPadding.set({top:n,bottom:0,left:r,right:r})})}))},n.prototype.shouldComponentUpdate=function(){return!1},n.prototype.componentWillUnmount=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},n.prototype.render=function(){var e=this,n=this.props,a=n.denaliEditor,u=n.documentModel,d=n.pageViewModel,h=n.features,m=n.children,g=null,v=r(h),_="edge"===c.BrowserInfo.browserInfo.browser?p.ScrollBarY:p.SelectAndScroll.withSelectOnScroll(p.ScrollBarY,{viewportPadding:this._viewportPadding,onScrollOnSelect:this.props.denaliEditor.extendSelectionTo});return o.createElement(s.F.div,i.__assign({},s.classes(f.container,this._textTransition),{mount:function(e){return g=e},onTransitionEnd:function(t){g&&g===t.target&&e._transitionEnd.next()}}),o.createElement(_,i.__assign({name:"text",key:"denaliEditorWrapper"},s.classes(v.scrollWrap,d.sidebarOpened.view(c.choose(v.editorComponentWrapperSqueezed,f.editorComponentWrapper))),{onMount:function(t){return e._scroll=t},update:a.contentUpdated.auditTime(1e3).merge(d.sidebarOpened.skip(1).mapTo(c.RxUtils.voidValue)),onScroll:this.onScroll,allowHover:!0}),o.createElement(l.DedComponent,{denaliEditor:a,title:u.title,theme:{editorContent:v.editorContent,editorContentWrap:v.editorContentWrap,title:f.title,printTitle:f.printTitle,titleWrap:f.titleWrap},viewportPadding:this._viewportPadding},h.denali.emptyTitle?null:o.createElement(t.ToolbarTitle,{denaliEditor:a,documentModel:u,features:h,onMount:function(t){return e._titleEl=t}}),m(this.onScroll))))},n}(u.BaseComponent);t.EditorComponent=v,function(e){e.Wrapper=function(e){var t=e.position,n=e.children,r=e.className;return o.createElement("div",i.__assign({},s.classes(f.container,r)),o.createElement("div",{className:h.scrollWrap},o.createElement("div",{className:"top"===t?f.editorTopContentWrap:h.editorContentWrap},o.createElement("div",{className:"top"===t?f.editorTopContent:h.editorContent},n))))}}(v=t.EditorComponent||(t.EditorComponent={})),t.EditorComponent=v},1873:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(14),a=n(7),s=n(311),l=n(23),c=n(3),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._subs=[],t._classes=a.Atom.create(""),t._state=a.Atom.create(o.Option.empty()),t._content=a.Atom.create(null),t._onTransitionEnd=function(){var e=t._state.get();e.contains(s.DocumentLoader.Type.checkingOut)&&t._state.set(o.None),e.isEmpty()&&t._content.set(null)},t}return r.__extends(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.theme,r=t.state;this._subs.push(this._state.pairwise().map(function(e){var t=e[0];return e[1].fold(function(){return t.fold(function(){throw new c.InvariantError("Cannot animate sidebar loader from None to None")},function(e){switch(e){case s.DocumentLoader.Type.checkingOut:return[n.checkingOutEnd+" "+n.hideEnd];case s.DocumentLoader.Type.checkingIn:return[n.checkingInEnd+" "+n.hideEnd];case s.DocumentLoader.Type.checking:return[n.hideStart,n.hideEnd];default:return c.assertNever(e)}})},function(e){switch(e){case s.DocumentLoader.Type.checkingOut:return t.contains(s.DocumentLoader.Type.checkingIn)?[n.checkingOutEnd]:t.isEmpty()?[n.hideEnd]:[n.checkingOutStart,n.checkingOutEnd];case s.DocumentLoader.Type.checkingIn:return t.contains(s.DocumentLoader.Type.checkingOut)?[n.checkingInEnd]:t.contains(s.DocumentLoader.Type.checking)?[]:[n.checkingInStart,n.checkingInEnd];case s.DocumentLoader.Type.checking:return[n.checkingStart,n.checkingEnd];default:return c.assertNever(e)}})}).switchMap(function(e){return c.Animation.rafSequence(e,!0)}).subscribe(c.RxUtils.toAtom(this._classes)),r.subscribe(function(t){e._state.set(t),null===e._content.get()&&t.nonEmpty()&&e._content.set(e.props.children)}),r.switchMap(function(){return l.Observable.timer(500)}).subscribe(this._onTransitionEnd))},t.prototype.componentWillUnmount=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},t.prototype.render=function(){var e=this;return i.createElement(a.F.div,{"data-role":"loader-content",key:"content",className:this._classes,mount:function(t){return t&&(e._el=t)},onTransitionEnd:function(t){return t.target===e._el&&e._onTransitionEnd()}},this._content)},t}(i.Component);t.SidebarLoader=u},1874:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(24),a=n(23),s=n(14),l=n(6),c=n(7),u=n(122),d=n(75),p=n(311),f=n(2005),h=n(1463),m=n(1544),g=n(1486),v=n(2016),_=n(1799),b=n(1700),y=n(1504),w=n(1562),E=n(1649),k=n(1564),x=n(1563),S=n(1701),C=n(2013),M=n(1523),A=n(1522),O=n(2014),T=n(1497),N=n(1496),L=n(2015),I=n(1804),P=n(1650),R=n(1816),D=n(2053),V=n(2028),B=n(2049),F=n(2018),j=n(1872),W=n(1560),U=n(1485),q=n(1691),H=n(3),z=n(1728),Y=n(1798),G=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._log=l.Monitoring.Logging.getLogger("editor_denali_page"),t._browserInfo=H.BrowserInfo.getBrowserInfo(),t._useHighHighlights="windows"===t._browserInfo.os||"linux"===t._browserInfo.os||"firefox"===t._browserInfo.browser,t._sidebarVM=new T.SidebarViewModelImpl(t.props.engine.alertsList),t._lensStateVM=new Y.DefaultLensStateManagerImpl(t._sidebarVM),t._cardPositions={ensureCardPosition:function(e,n,r){return void 0===n&&(n=!0),void 0===r&&(r=s.Option.empty()),t._scrollVM.ensureCardPosition(e,n,r)}},t._markPositions={ensureAlertMarksInViewport:function(e,n,r){return t._marksVM.ensureAlertMarksInViewport(e,n,r)},getMarkAlertPosition:function(e){return s.Try.of(function(){return t._marksVM.getVisibleMarkAlert(e).flatMap(function(e){return e.mark}).get().viewportRect[0].top}).recover(function(e){throw t._log.warn("Cannot get markAlert position",e),e}).toOption()}},t._setGoalsVisibilityState=t.context.documentLoader.setGoalsVisibilityState,t._alignmentVM=new N.AlignmentViewModelImpl(t._cardPositions,t._markPositions),t._pageVM=new g.PageViewModelImpl(t._sidebarVM,t._lensStateVM,t._alignmentVM,t.props.engine.alertsList,t.props.denaliEditorModel,t.props.engine.documentModel,t.props.userAccount.features,new f.PageVMContextModelImpl(t.context),t.props.userAccount.settings),t._editorViewport=c.Atom.create(H.DOM.Rect.empty),t._marksVM=new M.MarksViewModelImpl(t.props.denaliEditorModel,t._pageVM,t.props.engine.alertsList,t._useHighHighlights,t._editorViewport),t._cardsVM=new A.CardsViewModelImpl(t.props.denaliEditorModel,t._pageVM,t._lensStateVM),t._selectedCardVM=new O.SelectedCardViewModelImpl(t._pageVM,t._cardsVM,t._marksVM),t._scrollVM=new S.ScrollerViewModelImpl(t._cardsVM,t._pageVM,t.context),t._sidebarIOVM=new L.SidebarIOViewModel(t._scrollVM,t._marksVM,t._pageVM,t._alignmentVM),t._synonymsVM=new v.SynonymsViewModelImpl(t.props.engine.synonymsModel,t._pageVM,t.props.networkState,t._marksVM,t.props.denaliEditorModel,t.context.notifications),t._plagiarismVM=new y.PlagiarismViewModelImpl(t.props.denaliEditorModel,t.props.engine.plagiarismModel,t._sidebarVM,t._pageVM),t._proofitVM=new _.ProofitViewModelImpl(t.props.engine.documentModel.proofit,t.context.notifications,t.props.denaliEditorModel,t.props.userAccount,function(){window.PROOFIT_SUBMITTED=!0,t.context.appRouter.navigate(u.Router.routes.documents.href({}))}),t._successVM=new k.SuccessLensViewModelImpl(t._pageVM,t.props.denaliEditorModel,t.props.engine.documentModel),t._onboardingViewModel=new w.OnboardingViewModelImpl(t.props.userAccount.settings,t._pageVM,t.props.engine.alertsList,t._sidebarVM,t.props.userAccount.features),t._upgradeViewModel=new E.UpgradeViewModelImpl(t.props.engine.alertsList,t.props.userAccount.profile.view("id"),t.props.docId),t._searchViewModel=new x.SearchViewModelImpl(t.props.denaliEditorModel,t.props.engine.positionManager,t._editorViewport),t._reportViewModel=new b.ReportViewModelImpl(t.props.engine,t.props.userAccount.profile,t._plagiarismVM,t.context.notifications,t.props.userAccount.features),t._subs=[],t._tourLoadFinished=c.Atom.create(t.props.userAccount.features.denali.tour.isEmpty()),t}return r.__extends(t,e),t.prototype.componentWillMount=function(){var e=this;l.Monitoring.Logging.root.context.add({denali:!0,denaliGroup:this.props.userAccount.features.denali.denaliGroup}),this._loaderVM=new C.LoaderViewModel(this.context.documentLoader.state,this._pageVM,this.props.engine.documentModel,this.props.uploadViewModel,this.props.userAccount.features,this.props.denaliEditorModel,this.props.userAccount.settings,p.DocumentLoader.SetGoalsVisibilitySource.toVisible(this._setGoalsVisibilityState,"setGoalsLoader"),this._tourLoadFinished),this.context.documentLoader.state.view("text").filter(function(e){return e.isEmpty()}).first().subscribe(function(){e.props.uploadViewModel.showUploadNotificationIfNeeded()})},t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.engine,r=t.selfUpdate,i=t.userAccount,o=t.denaliEditorModel,a=t.wootricViewModel;this.context.gnarSpec.denaliDocumentPageShow("document",document.location.toString()),a.forEach(function(e){var t=i.profile.get(),n=t.id,r=t.registrationDate;e.init(n,r)}),this._subs.push(r.watch(n.documentModel.saved.startWith(!0),"saved"),o.dontFreezeWhen(this.context.visibleOverlays.view(function(e){return e.size>0}),"overlay")),this.context.appRouter.locationState.forEach(function(t){!0===t.showSwitchUINotification&&e.context.notifications.showMessage("You switched to the new Grammarly Editor for this document.")})},t.prototype.componentWillUnmount=function(){try{this.context.documentLoader.setGoalsVisibilityState.set("forceHidden"),this.props.wootricViewModel.forEach(function(e){return e.dispose()}),this.props.engine.shutdown(),this._searchViewModel.shutdown(),this._plagiarismVM.dispose(),this._loaderVM.dispose(),this._successVM.dispose(),this._subs.forEach(function(e){return e.unsubscribe()})}catch(e){l.Monitoring.Logging.getLogger("Main").error("Cannot shutdown the engine",e)}},t.prototype._blockNavigationWhenUnsavedChanges=function(){return a.Observable.fromEvent(window,"beforeunload").withLatestFrom(this.props.engine.documentModel.saved,function(e,t){return t?null:e}).filter(Boolean).subscribe(function(e){return e.returnValue="The changes in your document may be lost if you leave this page.","The changes in your document may be lost if you leave this page."})},t.prototype.getChildContext=function(){return r.__assign({},this.context,{onboardingViewModel:this._onboardingViewModel,pageId:"document",wootricViewModel:this.props.wootricViewModel})},t.prototype.render=function(){var e=this,t=this.props,n=t.denaliEditorModel,o=t.engine,s=t.userAccount,l=t.uploadViewModel;return i.createElement(d.Lifecycle,r.__assign({onMount:function(){return e._blockNavigationWhenUnsavedChanges()},onUnmount:function(){e._marksVM.dispose(),e._cardsVM.dispose(),e._lensStateVM.dispose(),e._selectedCardVM.dispose(),e._sidebarIOVM.dispose()}},c.classes(z.firstTier)),i.createElement(c.F.div,{"data-name":"document-content",className:z.secondTier},i.createElement(D.Toolbar,{pageViewModel:this._pageVM,documentModel:o.documentModel,featuresModel:s.features,settingsModel:s.settings,uploadViewModel:l,sidebarViewModel:this._sidebarVM}),i.createElement(j.EditorComponent,{denaliEditor:n,documentModel:o.documentModel,pageViewModel:this._pageVM,viewport:this._editorViewport,features:s.features},function(t){return i.createElement(c.F.div,null,e._pageVM.sidebarOpened.view(function(r){return!r&&i.createElement(W.InlineCardView,{key:"inlineCardView",className:z.inlineCardWrapper,inlineCardVM:new m.InlineCardViewModelImpl(e._marksVM,a.Observable.merge(t,n.contentUpdated),e.props.engine.alertsList,e._synonymsVM),onboardingViewModel:e._onboardingViewModel,viewport:e._editorViewport,openAlert:function(t){e._pageVM.switchToAlert(t,h.AlertActionSource.text,"textOrder")}})}),e._pageVM.sidebarOpened.view(function(t){return!t&&i.createElement(U.EditorOnboarding,{key:"onboarding",alignment:"bottomCenter",eventType:"onhover",stepId:"step2",title:"In-line corrections",message:"Hover your mouse over underlined words to fix issues with one click.",denaliEditorModel:n,marksVM:e._marksVM,viewport:e._editorViewport})}),i.createElement(B.SynonymsView,{synonyms:e._synonymsVM,viewport:e._editorViewport}))})),i.createElement(q.DenaliNotificationCenter,r.__assign({key:"denaliNotificationCenter"},this.props)),i.createElement(I.SearchBar,{searchViewModel:this._searchViewModel,key:"search-bar"}),i.createElement(F.FixedFooter,{ded:n,userAccount:this.props.userAccount,onboarding:this._onboardingViewModel,docId:this.props.docId}),i.createElement(V.Sidebar,{key:"sidebar",marksVM:this._marksVM,cardsVM:this._cardsVM,sidebarViewModel:this._sidebarVM,pageViewModel:this._pageVM,scrollViewModel:this._scrollVM,plagiarismViewModel:this._plagiarismVM,successLensViewModel:this._successVM,documentModel:o.documentModel,proofitViewModel:this._proofitVM,upgradeViewModel:this._upgradeViewModel,subscription:this.props.userAccount.subscription.state,features:this.props.userAccount.features,reportViewModel:this._reportViewModel,alignmentViewModel:this._alignmentVM,setGoalsVisibilityState:this._setGoalsVisibilityState,settingsModel:s.settings}),s.features.denali.tour.map(function(t){return i.createElement(R.TourWrapper,{key:"tour",type:t,settings:s.settings,tourLoaded:e._tourLoadFinished})}).orNull(),i.createElement(u.Router.Block,{when:o.documentModel.saved.map(function(e){return!e}),message:function(){return o.documentModel.flush().catch(function(t){return e._log.error("Could not flush document before exit",t)}),e._log.warn("unsaved changes prompt before navigate"),"You may have unsaved changes in your document that will be lost if you leave the page."}}))},t.childContextTypes=r.__assign({},u.BaseComponent.contextTypes,{onboardingViewModel:o.object,pageId:o.string,wootricViewModel:o.object}),t}(u.BaseComponent);t.Main=G,function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.state,n=e.features;return i.createElement(c.F.div,r.__assign({},c.classes(z.firstTierLoader)),t.view("text").switchMap(H.RxUtils.Scheduler.rafScheduler).map(function(e){return e.map(function(e){return i.createElement("div",r.__assign({key:"editor"},c.classes(z.secondTier,z.baseLoaderClass)),i.createElement(D.FakeToolbar,{features:n,type:e}),i.createElement(j.EditorComponent.Wrapper,{position:"top"},i.createElement("div",{className:z.textLoaderWrap},i.createElement(P.TextLoader,null))))}).orNull()}).startWith(null),i.createElement(V.Sidebar.Loader,{key:"sidebar-loader",state:t,baseLoaderClass:z.baseLoaderClass}))},t}(i.Component);e.Loader=t}(G=t.Main||(t.Main={})),t.Main=G},1884:function(e,t){e.exports={textWrapper:"_c2767b77-dropzone-textWrapper",text:"_23a59c3a-dropzone-text",titleWrap:"_ced2d7b3-dropzone-titleWrap _23a59c3a-dropzone-text _5fecbe22-editor-titleWrap",title:"_b58aecda-dropzone-title _23a59c3a-dropzone-text _81cb6eea-editor-title _f0b953d7-typography-header1",content:"_1fdeedb4-dropzone-content _23a59c3a-dropzone-text",animation:"_1e9df4ca-dropzone-animation",circle:"_fd283266-dropzone-circle",one:"_bcb720cc-dropzone-one _fd283266-dropzone-circle",two:"_ca501d08-dropzone-two _fd283266-dropzone-circle",three:"_1092a59f-dropzone-three _fd283266-dropzone-circle"}},1885:function(e,t){e.exports={base:"_cc101968-logo-base",icon:"_b50d371e-logo-icon"}},1888:function(e,t){e.exports={editorComponentWrapperSqueezed:"_626cbe1a-editor-editorComponentWrapperSqueezed _91d9eb52-editor-editorComponentWrapper",scrollWrap:"_cc176155-editor-scrollWrap",editorContentWrap:"_0fdab414-editor-editorContentWrap",editorContent:"_99e58804-editor-editorContent",toolbarTitleContainer:"_731de25a-editor-toolbarTitleContainer",toolbarShifted:"_1ab24078-editor-toolbarShifted",toolbarTitleHidden:"_021e155e-editor-toolbarTitleHidden",toolbarTitleVisible:"_e46f28c2-editor-toolbarTitleVisible _021e155e-editor-toolbarTitleHidden"}},1889:function(e,t){e.exports={scrollWrap:"_54b26ba0-editor-scrollWrap",editorContentWrap:"_dbb002b4-editor-editorContentWrap"}},1890:function(e,t){e.exports={editorComponentWrapperSqueezed:"_f2a8fcbb-editor-editorComponentWrapperSqueezed _91d9eb52-editor-editorComponentWrapper",editorContent:"_bf00c632-editor-editorContent"}},1891:function(e,t){e.exports={container:"_c6ac620b-editor-container",editorComponentWrapper:"_91d9eb52-editor-editorComponentWrapper",fade:"_22b4d69e-editor-fade",editorTopContentWrap:"_e7d74f70-editor-editorTopContentWrap",editorTopContent:"_f202d929-editor-editorTopContent",titleWrap:"_5fecbe22-editor-titleWrap",title:"_81cb6eea-editor-title _f0b953d7-typography-header1",printTitle:"_5c9846c5-editor-printTitle _81cb6eea-editor-title _f0b953d7-typography-header1",toEditingEnd:"_8ebf36b0-editor-toEditingEnd",toEditingStart:"_cd47eef6-editor-toEditingStart",toWritingEnd:"_d874dc15-editor-toWritingEnd",toWritingStart:"_c629d116-editor-toWritingStart"}},1892:function(e,t){e.exports={toolbar:"_a4a52e78-view-toolbar",scrollOnlyOnHover:"_2b0c0883-view-scrollOnlyOnHover",wrapper:"_7af018b8-view-wrapper",header:"_fe715241-view-header",description:"_e683757a-view-description",inputField:"_d17766db-view-inputField _e635cd19-typography-p1",briefDescriptionInput:"_5a33c4d5-view-briefDescriptionInput",feedbackInput:"_263f5160-view-feedbackInput",helpdesk:"_c17368b6-view-helpdesk",buttons:"_0740d134-view-buttons",feedbackPopupHeader:"_acf88b98-view-feedbackPopupHeader",feedbackPopupFooter:"_10796c9a-view-feedbackPopupFooter"}},1893:function(e,t){e.exports={footer:"_8844d3e0-view-footer",diagnosticMode:"_4043cea8-view-diagnosticMode",diagnosticModeDisable:"_8e68ae2d-view-diagnosticModeDisable",diagnosticModeIcon:"_b8560945-view-diagnosticModeIcon"}},1894:function(e,t){e.exports={documentActionsTeaser:"_cf8e5c79-navigation-documentActionsTeaser",documentActionsFull:"_5f0b19c2-navigation-documentActionsFull _cf8e5c79-navigation-documentActionsTeaser",blockTeaser:"_b66468d4-navigation-blockTeaser _81abaf57-button-round _46480f23-button-button",fadeIn1:"_b2643bcc-navigation-fadeIn1",blockTeaserBig:"_961c73f6-navigation-blockTeaserBig _b66468d4-navigation-blockTeaser _81abaf57-button-round _46480f23-button-button",blockFull:"_3be02721-navigation-blockFull _912ed3f2-button-sidebarFlat _44f85ed9-typography-header3 _46480f23-button-button",fadeIn2:"_cb4cf764-navigation-fadeIn2",actionIcon:"_fd1c9cba-navigation-actionIcon",hidden:"_9ae9c279-navigation-hidden",advancedCounterLabel:"_3707aa37-navigation-advancedCounterLabel",advancedCounterContent:"_36b73158-navigation-advancedCounterContent"}},1895:function(e,t){e.exports={fullHeight:"_de06857d-navigation-fullHeight",fullHeightLoaderNavigation:"_f8c69098-navigation-fullHeightLoaderNavigation _de06857d-navigation-fullHeight",fullHeightLoader:"_f32d8b88-navigation-fullHeightLoader _f8c69098-navigation-fullHeightLoaderNavigation _de06857d-navigation-fullHeight",navigationWrapper:"_0dfe0dbf-navigation-navigationWrapper _de06857d-navigation-fullHeight",navigationLoaderWrapper:"_4a6283d1-navigation-navigationLoaderWrapper _0dfe0dbf-navigation-navigationWrapper _de06857d-navigation-fullHeight",navigationLoaderWithToolbar:"_f80ddf54-navigation-navigationLoaderWithToolbar",baseWrapper:"_953f8315-navigation-baseWrapper _de06857d-navigation-fullHeight",wrapper:"_191aba7c-navigation-wrapper _953f8315-navigation-baseWrapper _de06857d-navigation-fullHeight",loaderWrapper:"_7b9687b6-navigation-loaderWrapper _191aba7c-navigation-wrapper _953f8315-navigation-baseWrapper _de06857d-navigation-fullHeight",loaderWrapperNoShadow:"_0a198c33-navigation-loaderWrapperNoShadow _7b9687b6-navigation-loaderWrapper _191aba7c-navigation-wrapper _953f8315-navigation-baseWrapper _de06857d-navigation-fullHeight",narrowWrapper:"_a26bca1d-navigation-narrowWrapper _953f8315-navigation-baseWrapper _de06857d-navigation-fullHeight",fixedWrapper:"_d29f999c-navigation-fixedWrapper _953f8315-navigation-baseWrapper _de06857d-navigation-fullHeight",headerWrapper:"_57e20808-navigation-headerWrapper",lensesAnimationWrapper:"_8769df05-navigation-lensesAnimationWrapper",onboardingNotification:"_92863097-navigation-onboardingNotification",actionIcon:"_4c961a4e-navigation-actionIcon",goalsCornerState:"_eb7ea0a9-navigation-goalsCornerState",delimiter:"_8462003f-navigation-delimiter",insightsOnboardingContainer:"_bb309f4c-navigation-insightsOnboardingContainer",goalsOnboardingContainer:"_9c1d8eb6-navigation-goalsOnboardingContainer",goalsOnboardingNotification:"_75b064db-navigation-goalsOnboardingNotification",goalsTriangleClassName:"_e8cd413a-navigation-goalsTriangleClassName",ensureClickable:"_2edccce9-navigation-ensureClickable"}},1896:function(e,t){e.exports={baseNavigationLoader:"_0d7c53e4-view-baseNavigationLoader",checkingInStart:"_fdc5fc3c-view-checkingInStart _0df65d85-view-navigationEnterLeftStart _0d7c53e4-view-baseNavigationLoader",checkingInEnd:"_3d43b449-view-checkingInEnd _63e96736-view-navigationEnterLeft _0d7c53e4-view-baseNavigationLoader",checkingOutStart:"_a2de69a5-view-checkingOutStart _42e709a5-view-navigationLeaveRightStart _0d7c53e4-view-baseNavigationLoader",checkingOutEnd:"_06c8e2cc-view-checkingOutEnd _a4bba7e4-view-navigationLeaveRight _0d7c53e4-view-baseNavigationLoader",checkingStart:"_18366392-view-checkingStart",checkingEnd:"_dd4b4835-view-checkingEnd",hideStart:"_5db14e25-view-hideStart",hideEnd:"_227caa8a-view-hideEnd"}},1897:function(e,t){e.exports={wrapper:"_7d4f321b-not-found-wrapper",logo:"_ebc01161-not-found-logo",img:"_03ab1b10-not-found-img",title:"_faad79c6-not-found-title",info:"_8969f84e-not-found-info",toHome:"_7b179f36-not-found-toHome"}},1899:function(e,t){e.exports={wrapper:"_3fdcb89a-sidebar-wrapper",info:"_9d95e177-sidebar-info",text:"_2fbc2865-sidebar-text",advancedBlockWrapper:"_be1de6bb-sidebar-advancedBlockWrapper",advancedBlock:"_94bdc3e3-sidebar-advancedBlock",counter:"_90592513-sidebar-counter",upgradeBlock:"_61947935-sidebar-upgradeBlock",footer:"_a540f88f-sidebar-footer",footerText:"_c80cb5f5-sidebar-footerText",footerLogo:"_014eb7e2-sidebar-footerLogo",alertList:"_fe5a28d1-sidebar-alertList",alertBlock:"_b63c507f-sidebar-alertBlock",graphBlock:"_d76d04d2-sidebar-graphBlock",graphCircle:"_f209dd32-sidebar-graphCircle",graphCircle1:"_9f80c5ed-sidebar-graphCircle1 _f209dd32-sidebar-graphCircle",graphCircle2:"_2d9b5960-sidebar-graphCircle2 _f209dd32-sidebar-graphCircle",graphCircle3Empty:"_4e865e0b-sidebar-graphCircle3Empty _2d9b5960-sidebar-graphCircle2 _f209dd32-sidebar-graphCircle",graphCircle3:"_741b140b-sidebar-graphCircle3 _f209dd32-sidebar-graphCircle",graphCounter:"_b6ff242d-sidebar-graphCounter",graphCounterWin:"_8e16713b-sidebar-graphCounterWin",opacity90:"_43b51cda-sidebar-opacity90",opacity80:"_ca5cbad1-sidebar-opacity80",opacity70:"_8f8880d4-sidebar-opacity70",opacity60:"_c19a4bef-sidebar-opacity60",opacity50:"_448664ca-sidebar-opacity50",headerTitle:"_9ae20ee6-sidebar-headerTitle"}},1900:function(e,t){e.exports={content:"_d385ac1e-plagiarism-content",loader:"_39eecb8a-plagiarism-loader",loadingText:"_36526d40-plagiarism-loadingText _8d8a7136-typography-p2",originality100Text:"_fe55e66b-plagiarism-originality100Text _36526d40-plagiarism-loadingText _8d8a7136-typography-p2",illusration:"_a324d472-plagiarism-illusration"}},1901:function(e,t){e.exports={infoDark:"_e8e6c942-sidebar-infoDark",referenceLink:"_73e4f949-sidebar-referenceLink _e8e6c942-sidebar-infoDark",info:"_7a52f04f-sidebar-info _9774c814-sidebar-info"}},1902:function(e,t){e.exports={sidebarHeader:"_1a2ccc12-sidebar-sidebarHeader",togglerWrapper:"_bd885341-sidebar-togglerWrapper",hidden:"_865c8140-sidebar-hidden",startEditingBtn:"_a81ac81b-sidebar-startEditingBtn",finishEditingBtn:"_caa25250-sidebar-finishEditingBtn _a81ac81b-sidebar-startEditingBtn",exitIcon:"_299d7d3c-sidebar-exitIcon",counterWrapper:"_6bafdfcc-sidebar-counterWrapper",counter:"_8e65d886-sidebar-counter",counterBtn:"_3459a61d-sidebar-counterBtn",overviewBtn:"_dd1bd57f-sidebar-overviewBtn",fadeIn:"_28079aac-sidebar-fadeIn",rankLabel:"_05b44542-sidebar-rankLabel",scoreWrapper:"_4c0d77f0-sidebar-scoreWrapper",score:"_f9405404-sidebar-score",zeroScore:"_b1c8e16d-sidebar-zeroScore _f9405404-sidebar-score",checking:"_0abfadb2-sidebar-checking",overviewTooltip:"_c1e3ed35-sidebar-overviewTooltip",lensToggler:"_d08ed756-sidebar-lensToggler",doneEditingWrapper:"_c3aa1669-sidebar-doneEditingWrapper _fb866abb-typography-small",doneEditingBase:"_4b232131-sidebar-doneEditingBase",doneEditingVisible:"_2de85933-sidebar-doneEditingVisible _4b232131-sidebar-doneEditingBase",doneEditingHidden:"_c451fd83-sidebar-doneEditingHidden _4b232131-sidebar-doneEditingBase",hideAssistantBtn:"_fcbb7edf-sidebar-hideAssistantBtn",hideAssistant:"_9bb5f2c3-sidebar-hideAssistant",hideAssistantVisible:"_238003ad-sidebar-hideAssistantVisible _9bb5f2c3-sidebar-hideAssistant",hideAssistantIn:"_f43bfb62-sidebar-hideAssistantIn",hideAssistantHidden:"_fb98d110-sidebar-hideAssistantHidden _9bb5f2c3-sidebar-hideAssistant"}},1903:function(e,t){e.exports={sidebarLoaderBase:"_9b32e122-view-sidebarLoaderBase",checkingInStart:"_515cf48e-view-checkingInStart _ccc19bc5-view-sidebarEnterLeftStart _9b32e122-view-sidebarLoaderBase",checkingInEnd:"_64e8ed80-view-checkingInEnd _a6140d6a-view-sidebarEnterLeft _9b32e122-view-sidebarLoaderBase",checkingOutStart:"_b39be6f4-view-checkingOutStart _626a800b-view-sidebarLeaveRightStart _9b32e122-view-sidebarLoaderBase",checkingOutEnd:"_a258a749-view-checkingOutEnd _0c0b9e69-view-sidebarLeaveRight _9b32e122-view-sidebarLoaderBase",checkingStart:"_cc3d9146-view-checkingStart",checkingEnd:"_52a15156-view-checkingEnd",hideStart:"_472e6755-view-hideStart",hideEnd:"_29cad7e3-view-hideEnd"}},1904:function(e,t){e.exports={toolbarBtn:"_0d2f6b94-toolbar-toolbarBtn",backIcon:"_5b11d279-toolbar-backIcon",text:"_e8d49436-toolbar-text",goalsWrapper:"_76a4d0e1-toolbar-goalsWrapper _e8d49436-toolbar-text",goalsBtn:"_41c2d6ab-toolbar-goalsBtn",uploadIcon:"_17f7aef2-toolbar-uploadIcon",dropdownContainer:"_d683884a-toolbar-dropdownContainer",actionBlockWrapper:"_fd9d8135-toolbar-actionBlockWrapper"}},1905:function(e,t){e.exports={wrapper:"_55d5878b-toolbar-wrapper",title:"_01703880-toolbar-title",discoverabilityOnExit:"_53782af4-toolbar-discoverabilityOnExit",discoverabilityOnExitTriangle:"_a5086f13-toolbar-discoverabilityOnExitTriangle",dropdownContainer:"_654e2b95-toolbar-dropdownContainer _d683884a-toolbar-dropdownContainer",onboardingSpot:"_0616da28-toolbar-onboardingSpot",notSaved:"_7408ef12-toolbar-notSaved _e8d49436-toolbar-text",saved:"_da134def-toolbar-saved _7408ef12-toolbar-notSaved _e8d49436-toolbar-text",fadeinout:"_9f32d8a8-toolbar-fadeinout"}},1906:function(e,t){e.exports={lightTitle:"_4fa8c8ba-toolbar-lightTitle",darkTitle:"_d2f485df-toolbar-darkTitle"}},1907:function(e,t){e.exports={wrapper:"_907259b4-toolbar-wrapper",statusVisible:"_870432a2-toolbar-statusVisible _e8d49436-toolbar-text",notSaved:"_a7419df7-toolbar-notSaved _870432a2-toolbar-statusVisible _e8d49436-toolbar-text",saved:"_1cc3527a-toolbar-saved _a7419df7-toolbar-notSaved _870432a2-toolbar-statusVisible _e8d49436-toolbar-text",fadeinout:"_8a3ed5c0-toolbar-fadeinout",dropdownList:"_5071d93f-toolbar-dropdownList",dropdownContainer:"_ab26b584-toolbar-dropdownContainer",discoverabilityOnExit:"_9b52f727-toolbar-discoverabilityOnExit",discoverabilityOnExitTriangle:"_36c27548-toolbar-discoverabilityOnExitTriangle",toolbarBtn:"_53ebd707-toolbar-toolbarBtn _0d2f6b94-toolbar-toolbarBtn",buttons:"_4557b3f9-toolbar-buttons"}},1984:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(122),s=n(1872),l=n(1633),c=n(1467),u=n(1884),d=n(75),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.render=function(){var e=this;return i.createElement(l.DropZoneBase,{documentUpload:this.props.documentUpload,notifications:this.props.notifications,canDrop:function(){return!0},render:function(t,n){return i.createElement(o.F.div,null,o.Atom.combine(t,n,function(t,n){return(t||n)&&i.createElement(d.Lifecycle,{className:u.animation,onMount:function(){return e.context.documentLoader.setGoalsVisibilityState.set("forceHidden")}},i.createElement("div",{className:u.one}),i.createElement("div",{className:u.two}),i.createElement("div",{className:u.three}),i.createElement(s.EditorComponent.Wrapper,{position:"center",className:u.textWrapper},i.createElement("div",{className:u.titleWrap},i.createElement(c.H1,{className:u.title},e.context.textResources.denali.uploadDropZone)),i.createElement(c.Paper,{className:u.content},e.context.textResources.denali.uploadDropZoneTypes)))}))}})},t}(a.BaseComponent);t.DropZone=p},1989:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(573),s=n(1885);t.GrammarlyLogo=function(e){var t=e.className;return i.createElement("div",r.__assign({},o.classes(s.base,t)),i.createElement(a.Icon.Grammarly,{className:s.icon}),i.createElement("svg",{width:"99",height:"18",viewBox:"0 0 99 18"},i.createElement("g",{fill:"#4C4C4C",fillRule:"evenodd"},i.createElement("path",{d:"M2 17.16c-.5-.2-.84-.6-.84-1.16 0-.67.55-1.23 1.22-1.23.2 0 .36.04.5.1.86.4 1.8.63 2.92.63 2.05 0 3.02-.98 3.02-2.88v-.5c-.9 1.05-1.86 1.7-3.46 1.7-2.47 0-4.7-1.8-4.7-4.93v-.05c0-3.16 2.27-4.93 4.7-4.93 1.64 0 2.6.7 3.42 1.58v-.02c0-.8.67-1.48 1.5-1.48s1.5.67 1.5 1.5v6.8c0 1.9-.46 3.28-1.35 4.17-.98 1-2.5 1.42-4.55 1.42-1.4 0-2.63-.25-3.87-.74zM8.83 8.9v-.05c0-1.44-1.13-2.45-2.6-2.45-1.45 0-2.56 1-2.56 2.45v.04c0 1.45 1.1 2.44 2.57 2.44 1.46 0 2.6-1 2.6-2.45zM13.47 5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5v.47C16.9 4.94 17.62 4 18.5 4c.94 0 1.47.6 1.47 1.46 0 .8-.52 1.26-1.13 1.4-1.52.35-2.37 1.52-2.37 3.65v2.8c0 .84-.67 1.5-1.5 1.5s-1.5-.66-1.5-1.5V5.5M19.6 11.65v-.03c0-2.3 1.77-3.38 4.28-3.38 1.06 0 1.83.18 2.58.43V8.5c0-1.25-.77-1.94-2.27-1.94-.84 0-1.5.12-2.08.3-.18.06-.3.08-.43.08-.7 0-1.26-.54-1.26-1.23 0-.52.34-.97.8-1.15.96-.36 1.98-.55 3.4-.55 1.62 0 2.8.43 3.56 1.18.8.8 1.14 1.96 1.14 3.38v4.8c0 .82-.65 1.45-1.46 1.45-.87 0-1.44-.6-1.44-1.23v-.02c-.73.8-1.73 1.34-3.2 1.34-2 0-3.63-1.15-3.63-3.25zm6.9-.7v-.52c-.5-.24-1.18-.4-1.9-.4-1.3 0-2.1.52-2.1 1.47v.04c0 .8.7 1.28 1.65 1.28 1.4 0 2.35-.77 2.35-1.86zM30.94 5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5v.12c.7-.9 1.6-1.7 3.12-1.7 1.38 0 2.43.6 2.98 1.68.93-1.1 2.03-1.68 3.47-1.68 2.25 0 3.6 1.34 3.6 3.9v5.5c0 .82-.68 1.5-1.5 1.5-.84 0-1.5-.68-1.5-1.5V8.78c0-1.43-.64-2.16-1.77-2.16-1.12 0-1.8.73-1.8 2.15v4.5c0 .84-.7 1.5-1.52 1.5-.8 0-1.5-.66-1.5-1.5V8.8c0-1.43-.62-2.16-1.74-2.16-1.13 0-1.82.73-1.82 2.15v4.5c0 .84-.67 1.5-1.5 1.5s-1.5-.66-1.5-1.5V5.5M48.7 5.5c0-.83.68-1.5 1.5-1.5.84 0 1.5.67 1.5 1.5v.12c.7-.9 1.6-1.7 3.13-1.7 1.38 0 2.42.6 2.98 1.68.93-1.1 2.04-1.68 3.48-1.68 2.23 0 3.57 1.34 3.57 3.9v5.5c0 .82-.67 1.5-1.5 1.5s-1.5-.68-1.5-1.5V8.78c0-1.43-.63-2.16-1.75-2.16-1.13 0-1.82.73-1.82 2.15v4.5c0 .84-.67 1.5-1.5 1.5s-1.5-.66-1.5-1.5V8.8c0-1.43-.63-2.16-1.76-2.16-1.12 0-1.8.73-1.8 2.15v4.5c0 .84-.68 1.5-1.5 1.5-.84 0-1.5-.66-1.5-1.5V5.5M65.84 11.65v-.03c0-2.3 1.76-3.38 4.26-3.38 1.07 0 1.84.18 2.6.43V8.5c0-1.25-.78-1.94-2.28-1.94-.83 0-1.5.12-2.07.3-.18.06-.3.08-.44.08-.68 0-1.23-.54-1.23-1.23 0-.52.33-.97.8-1.15.96-.36 1.98-.55 3.38-.55 1.64 0 2.83.43 3.58 1.18.8.8 1.14 1.96 1.14 3.38v4.8c0 .82-.65 1.45-1.46 1.45-.86 0-1.43-.6-1.43-1.23v-.02c-.73.8-1.74 1.34-3.2 1.34-2 0-3.63-1.15-3.63-3.25zm6.9-.7v-.52c-.52-.24-1.2-.4-1.93-.4-1.27 0-2.06.52-2.06 1.47v.04c0 .8.67 1.28 1.64 1.28 1.4 0 2.35-.77 2.35-1.86zM77.17 5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5v.47C80.6 4.94 81.3 4 82.2 4c.93 0 1.46.6 1.46 1.46 0 .8-.5 1.26-1.12 1.4-1.52.35-2.37 1.52-2.37 3.65v2.8c0 .84-.67 1.5-1.5 1.5s-1.5-.66-1.5-1.5V5.5M84.57 1.67c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V13.3c0 .84-.67 1.5-1.5 1.5s-1.5-.66-1.5-1.5V1.68M89.96 17.63c-.43-.15-.95-.5-.95-1.24s.58-1.23 1.2-1.23c.23 0 .37.04.5.08.25.08.4.12.62.12.53 0 .8-.1 1.07-.64l.1-.23-3.63-8.37c-.07-.2-.15-.5-.15-.7 0-.84.65-1.43 1.48-1.43.75 0 1.18.4 1.44 1.12l2.3 6.16 2.2-6.14C96.37 4.5 96.8 4 97.58 4c.77 0 1.42.6 1.42 1.38 0 .24-.08.57-.14.7l-3.7 8.87c-.88 2.15-1.77 2.96-3.56 2.96-.67 0-1.15-.1-1.64-.27"}))))}},2001:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(122),a=n(1874),s=n(311),l=n(123),c=n(6),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._log=c.Monitoring.Logging.getLogger("denali_loader"),t._metric=c.Monitoring.TimeSeries.root.getMetric("denali_loader"),t._state=t.context.documentLoader.state,t._subs=[],t}return r.__extends(t,e),t.prototype.componentWillMount=function(){this._listenLoading(this.props)},t.prototype.componentWillReceiveProps=function(e){this._clear(),this._listenLoading(e)},t.prototype.componentWillUnmount=function(){this._clear()},t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.render=function(){return i.createElement(a.Main.Loader,{key:"loading",state:this._state,features:this.props.features})},t.prototype._listenTimeseries=function(e,t,n){var r=this;return void 0===n&&(n=!1),this._state.skip(1).map(function(e){return t(e)}).distinctUntilChanged().map(function(t){if(void 0!==t)return n&&r._metric.getCounter(e+"."+t+".start.counter").increment(),{time:r._metric.getTimer(e+"."+t+".time").start(),counter:n?r._metric.getCounter(e+"."+t+".stop.counter"):void 0}}).pairwise().subscribe(function(e){var t=e[0];t&&(t.time.stop(),t.counter&&t.counter.increment())})},t.prototype._listenLoading=function(e){var t=this;this._state.distinctUntilChanged().subscribe(function(e){t._log.debug("State is changed to "+s.DocumentLoader.State.toString(e))}),this._subs.push(this._listenTimeseries("text",function(e){return e.text.orUndefined()},!0),this._listenTimeseries("lens",function(e){return e.lens.filter(function(e){return"checkingOut"!==e}).map(function(){return"checking"}).orUndefined()}),this._listenTimeseries("navigation",function(e){return e.navigation.filter(function(e){return"checkingOut"!==e}).map(function(){return"checking"}).orUndefined()}));var n=e.features.denali.openOnPasteAndUploadMode.contains(l.DenaliFeatures.OpenOnPasteOrUploadMode.tripleLoader),r=e.features.denali.openOnPasteAndUploadMode.contains(l.DenaliFeatures.OpenOnPasteOrUploadMode.goalsLoader);this.context.appRouter.locationState.exists(function(e){return!0===e.openSidebar})&&(n||r)?this._state.set(r&&e.features.denali.tour.isEmpty()?s.DocumentLoader.State.lensAndNavigationProcessing:s.DocumentLoader.State.processing):this._state.set(s.DocumentLoader.State.text),this._subs.push(e.engineStream.subscribe(function(e){e.map(function(e){e.isLeft()&&t._state.set(s.DocumentLoader.State.idle)})}))},t.prototype._clear=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},t}(o.BaseComponent);t.DenaliEditorLoader=u},2002:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(14),i=n(6),o=n(1463),a=function(){function e(e,t,n,r,a,s,l,c,u,d){void 0===d&&(d=3e3);var p=this;this._documentId=e,this._alertManager=a,this._context=l,this._isFree=c,this._alertCache=u,this._log=i.Monitoring.Logging.getLogger("AlertsCacheManagerImpl"),this._subs=[],this._log.debug("Loading alerts from cache...");try{var f=this.getCorrectAlerts(t);f.forEach(function(e){return n.next({kind:"alert_received",alert:e})}),this._log.debug(f.length+" cached alert(s) where loaded")}catch(e){this._log.warn("Cannot read alerts cache",e)}this._subs.push(n.filter(function(e){return"session_started"===e.kind}).switchMap(function(){return n.skipWhile(function(e){return"finish"!==e.kind}).filter(function(e){return"alert_received"===e.kind||"alert_removed"===e.kind}).merge(r.changes).merge(s).merge(a.alertEvents)}).auditTime(d).subscribe(function(){return p.saveAlerts(p._alertManager.getAllAlertsAsArray().filter(o.Alert.isCacheable).map(function(e){return e.toRawAlert()}))}))}return e.prototype.getCorrectAlerts=function(e){var t=this;return r.Option.of(this._alertCache.load(this._documentId,this._context.get(),this._isFree)).getOrElse([]).filter(function(n){return t._isRawAlertCorrect(n,e)})},e.prototype.saveAlerts=function(e){this._alertCache.save(this._documentId,this._context.get(),this._isFree,e)},e.prototype.dispose=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},e.prototype._isRawAlertCorrect=function(e,t){return!!e&&t.substring(e.highlightBegin,e.highlightEnd)===e.highlightText},e}();t.AlertsCacheManagerImpl=a},2003:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(23);!function(e){function t(e){return{changes:r.Observable.merge.apply(r.Observable,e.map(function(e){return e.changes}))}}e.merge=t}(t.ChangesSource||(t.ChangesSource={}))},2004:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(157),i=n(6),o=3e5,a=function(){function e(t,n,a,s,l,c){var u=this;this._log=i.Monitoring.Logging.getLogger("ChangesDispatcher"),this._log.debug("Got initial text, len: "+t.length);var d=n.changes,p=e._dedToSync(n,"api"),f=e._dedToSync(n,"user");d.map(function(){return n.getTextLength()}).distinctUntilChanged().throttleTime(o).subscribe(function(e){i.Monitoring.TimeSeries.root.getTimer("text_length").recordTime(e)}),d.subscribe(function(e){u._log.trace("FROM DED: pmtl: ",{changes:e,delta:r.Change.isDelta(e)?e.delta:null}),l.pushChanges(e),s.pushChanges(e),a.pushChanges(e)}),c.changes.subscribe(function(e){f.pushChanges(e)}),a.changes.subscribe(function(e){u._log.trace("Got REMOTE changes:",e),s.pushChanges(e),p.pushChanges(e),l.pushChanges(e)}),s.events.subscribe(function(e){if("before_alert"===e.kind)n.flushChanges();else if("session_started"===e.kind){u._log.debug("session_started from capi"),n.flushChanges();var t=n.getContents();s.pushChanges(t)}}),l.pushChanges(t),p.pushChanges(t)}return e._dedToSync=function(e,t){return{pushChanges:function(n){e.pushChanges(n,t),"user"!==t||r.Change.isFlush(n)||e.flushChanges()}}},e}();t.ChangesDispatcher=a},2005:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=function(){function e(e){this._context=e}return Object.defineProperty(e.prototype,"goalsVisibilityState",{get:function(){return"hidden"!==this._context.documentLoader.setGoalsVisibilityState.get()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"notifications",{get:function(){return this._context.notifications},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"openSidebar",{get:function(){return this._context.appRouter.locationState.exists(function(e){return!0===e.openSidebar})},enumerable:!0,configurable:!0}),e.prototype.trackLensChange=function(e){this._context.gnarSpec.lensSidebarShow(r.StringUtils.camelize(e),this._context.pageId)},e.prototype.trackAdvancedLensOpen=function(e){this._context.gnarSpec.advancedIssuesSidebarShow(this._context.pageId,e)},e.prototype.assistantSidebarClose=function(){this._context.gnarSpec.assistantSidebarClose(this._context.pageId)},e.prototype.assistantSidebarShow=function(){this._context.gnarSpec.assistantSidebarShow(this._context.pageId)},e}();t.PageVMContextModelImpl=i;!function(e){var t=function(){function e(e,t){void 0===t&&(t=!1),this.notifications=e,this.openSidebar=t,this.goalsVisibilityState=!1}return e.prototype.trackLensChange=function(){},e.prototype.trackAdvancedLensOpen=function(){},e.prototype.assistantSidebarClose=function(){},e.prototype.assistantSidebarShow=function(){},e}();e.PageVMContextModelMock=t}(t.ContextModel||(t.ContextModel={}))},2006:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(23),i=n(6),o=n(1513),a=n(321),s=function(){function e(e,t,n,r){var s=this;this._docModel=e,this._doxInit=t,this._doxEvents=n,this._features=r,this._log=i.Monitoring.Logging.getLogger("DoxSyncManager"),this._counter=i.Monitoring.TimeSeries.root.getCounter("dox.denali"),this.changes=this._doxEvents.deltaChanges,this._settingsHolder=t.meta.settings,this._title=t.meta.title,this._subs=[this._docModel.title.filter(function(e){return e!==s._title}).do(function(e){return s._docModel.saved.next(!1)}).debounceTime(1e3).subscribe(function(e){s._updateTitle(e)}),this._docModel.context.skip(1).subscribe(function(e){var t=s._settingsHolder.changeContext(e);s._updateSettings(t)}),this._docModel.extraSettings.changes.subscribe(function(e){var t=s._settingsHolder.changeExtra(e);s._updateSettings(t)}),this._docModel.checkingState.combineLatest(this._docModel.counters).filter(function(e){var t=e[0],n=e[1];return"idle"===t&&o.DocumentCounters.isValid(n)}).map(function(e){e[0];return e[1]}).skip(1).debounceTime(1e3).distinctUntilChanged().subscribe(function(e){s._doxInit.remoteDocument.updateMetadata({errors:e.advanced+e.critical})}),this._doxEvents.metadataChanges.subscribe(function(e){s._settingsHolder=e.settings,e.proofit.forEach(function(e){return s._docModel.proofit.updateState(e)}),s._title=e.title,s._docModel.title.set(e.title)}),this._doxEvents.acceptedMessage.subscribe(function(e){a.ChangesQueue.isCmd(e)||s._incCounter(e.kind,"accepted"),s._docModel.saved.next(s._doxInit.remoteDocument.inSync)}),this._doxEvents.droppedMessages.subscribe(function(e){var t=e.messages,n=e.reason,r=s._groupMessages(t);void 0!==r.change&&s._incCounter("change","dropped",r.change),void 0!==r.meta&&s._incCounter("meta","dropped",r.meta),r.change&&s._log.warn("got dropped messages",{counts:r,reason:n}),s._docModel.saved.next(s._doxInit.remoteDocument.inSync)})]}return e.createDoxEventsCollector=function(){return{deltaChanges:new r.Subject,metadataChanges:new r.Subject,acceptedMessage:new r.Subject,droppedMessages:new r.Subject}},e.prototype.pushChanges=function(e){this._features.demoMode||(this._incCounter("change","sent"),this._docModel.saved.next(!1),this._doxInit.remoteDocument.pushChanges(e))},e.prototype.dispose=function(){this._subs.forEach(function(e){return e.unsubscribe()})},e.prototype._updateSettings=function(e){this._incCounter("meta","sent"),this._docModel.saved.next(!1),this._settingsHolder=e,this._doxInit.remoteDocument.updateMetadata({settings:e})},e.prototype._updateTitle=function(e){this._incCounter("meta","sent"),this._docModel.saved.next(!1),this._title=e,this._doxInit.remoteDocument.updateMetadata({title:e})},e.prototype._incCounter=function(e,t,n){void 0===n&&(n=1),this._counter.getCounter("message."+e+"."+t).increment(n)},e.prototype._groupMessages=function(e){return e.reduce(function(e,t){return void 0===e[t.kind]&&(e[t.kind]=0),e[t.kind]++,e},{})},e}();t.DoxSyncManager=s},2007:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(23),o=n(7),a=n(3),s=function(){function e(e,t){var n=this;this._documentModel=e,this._capiClient=t,this.checkingState=this._documentModel.asyncChecksState.lens(function(e){return e.plagiarism}),this._subs=[],this._isEnabled=o.Atom.create(!1),this._enable=function(){n.checkingState.modify(function(e){return"idle"===e?"checking":e}),n._documentModel.extraSettings.checkedPlagiarism=!0,n._capiClient.capi.enablePlagiarismSearch()},this._disable=function(){n._capiClient.capi.disablePlagiarismSearch()},this._subs.push(this._isEnabled.switchMap(function(e){return e?n._capiClient.events.filter(function(e){return"session_started"===e.kind}):i.Observable.empty()}).subscribe(this._enable))}return e.prototype.enable=function(){this._isEnabled.set(!0),this._enable()},e.prototype.disable=function(){this._isEnabled.set(!1),this._disable()},e.prototype.recheck=function(){return r.__awaiter(this,void 0,void 0,function(){var e;return r.__generator(this,function(t){switch(t.label){case 0:return e=!this._isEnabled.get(),e&&this._enable(),[4,this.checkingState.filter(function(e){return"idle"===e}).first().toPromise()];case 1:return t.sent(),e&&this._capiClient.capi.disablePlagiarismSearch(),[2]}})})},e.prototype.dispose=function(){this._subs.forEach(function(e){return e.unsubscribe()})},e}();t.PlagiarismModelImpl=s;!function(e){var t=function(){function e(){this.enable=a.noop,this.disable=a.noop,this.recheck=function(){return new Promise(a.noop)},this.dispose=a.noop,this.checkingState=o.Atom.create("full")}return e}();e.Mock=t}(t.PlagiarismModel||(t.PlagiarismModel={}))},2008:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(23),o=n(54),a=n(124),s=n(1513),l=n(2003),c=n(1480),u=n(2004),d=n(1695),p=n(1694),f=n(1791),h=n(2002),m=n(1693),g=n(3),v=n(2007),_=n(598),b=n(575),y=n(2006),w=n(77),E=n(6),k=function(){function e(e,t,n,r,i,o,a,s){this._capiClient=e,this._remoteDocument=t,this.documentModel=n,this.positionManager=r,this.alertsList=i,this.synonymsModel=o,this.plagiarismModel=a,this._doxSyncManager=s}return e.create=function(t,n,s,w,E,k,x,S,C){var M=this,A=y.DoxSyncManager.createDoxEventsCollector(),O=a.DoxRemoteDocument.Queue.create({acceptedMsgHandler:function(e){return A.acceptedMessage.next(e)},droppedMsgsHandler:function(e){return A.droppedMessages.next(e)}});return s.openDocumentById(k,{changeHandler:function(e,t){return A.deltaChanges.next(t)},disconnectHandler:e._getDoxDisconnectHandler(w),metadataChangeHandler:function(e,t){return A.metadataChanges.next(t)}},O,5e3).then(function(a){return r.__awaiter(M,void 0,void 0,function(){var M,O,T,N,L,I,P,R,D,V,B,F,j,W;return r.__generator(this,function(r){return w.setState({type:"wsDox",state:{type:"online"}}),M=new i.Subject,O=x.dialect.get().getOrElse("undefined"),T=new o.CAPI.CAPIClientImpl({url:t.api.capiWsUrl,client:"denali_editor",context:a.meta.settings.context.getOrElse(o.DocumentContext.empty),handler:d.ObservableCAPIClient.getCapiHandler(M,w),docid:k,dialect:O}),N=e._getDocumentModel(k,a,E,T,s,C,S),L=new y.DoxSyncManager(N,a,A,S),I=N.context.view(function(e){return e.domain+"."+O}),P=new _.AlertCacheImpl(function(e){return e.filter(function(e){return b.RawAlert.isRawAlert(e)})},function(e){return e},"DN-"+t.alertCachePrefix,t.alertCacheVersion,g.LocalStorage.DenaliStorage.fromLocalStorage(g.LocalStorage.ls),12096e5),R=new d.ObservableCAPIClientImpl(T,M,N,x,n,P.hasCache(k,I.get(),S.isFree),a.initialDelta.length),D=m.LensManagerFactory.get(N.counters),V=new c.PositionManager,B=new p.AlertManager(V,R,D),F=new f.SynonymsModelImpl(V,T),j=new v.PlagiarismModelImpl(N,R),new u.ChangesDispatcher(a.initialDelta,E,L,R,V,l.ChangesSource.merge([B,F])),W=new e(T,a.remoteDocument,N,V,B,F,j,L),new h.AlertsCacheManagerImpl(k,a.initialDelta.text.get(),M,V,B,N.counters.view("unread"),I,S.isFree,P),B.flushAlerts(),g.registerDebugHelper("text",function(){T.getText().then(function(e){var t=E.getText();t!==e?console.log("Text DIFF",{capiText:e,capiLen:e.length,dedText:t,dedTextLen:t.length}):console.log("Texts are the same, len: "+t.length)}).catch(function(e){throw e})}),g.registerDebugHelper("engine",W),g.registerDebugHelper("alertManager",B),g.registerDebugHelper("capi",T),[2,W]})})})},e.prototype.shutdown=function(){this._capiClient.close(),this._remoteDocument.close(),this._doxSyncManager.dispose(),this.plagiarismModel.dispose()},e._getDocumentModel=function(e,t,n,r,i,o,a){return new s.DocumentModelImpl(e,t,function(){return n.getText()},function(){return r.requestDocStats()},i,o,a.enableTrackingOnDownload.get(),function(){return n.flushChanges()})},e._getDoxDisconnectHandler=function(e){var t=this,n=E.Monitoring.Logging.getLogger("DoxConnectivity"),i=w.Reconnect.getDefaultReconnect(n,w.Reconnect.ClientType.dox);return function(o,a,s,l){return r.__awaiter(t,void 0,void 0,function(){var t,c,u,d;return r.__generator(this,function(r){switch(r.label){case 0:n.debug("Disconnected from dox",o),t={code:o.code,reason:o.reason,reconnectAction:l},c=function(r){"online"===r?n.info("WS DOX connectivity online"):"error"===l?n.info("WS DOX connectivity error: "+r,o.error,t):n.info("WS DOX connectivity error, reconnecting: "+r,o.error,t),e.setState({type:"wsDox",state:{type:r}})},r.label=1;case 1:switch(r.trys.push([1,6,,7]),o.code){case w.Reconnect.WsCodes.NOT_FOUND:c("documentNotFoundError");break;case w.Reconnect.WsCodes.UNAUTHORIZED:c("unauthorized");break;case w.Reconnect.WsCodes.BLOCKED_BY_CLIENT:c("blockedByClient");break;case w.Reconnect.WsCodes.CLIENT_MALFUNCTION:case w.Reconnect.WsCodes.PRECONDITION_FAILED:c("unknownConnectionError");break;default:o.reconnect.reconnectCounter>=2?c([0,w.Reconnect.WsCodes.UNKNOWN_WS_ERROR,w.Reconnect.WsCodes.CLOSED_ABNORMALLY].indexOf(o.code)>=0?"unknownConnectionError":"serverError"):"error"===l&&c("serverError")}r.label=2;case 2:return r.trys.push([2,4,,5]),[4,i(o,a,s,l)];case 3:return r.sent(),c("online"),[3,5];case 4:if(u=r.sent(),n.info("Reconnect failed with an error",u),"error"===l)throw o.error;return[3,5];case 5:return[3,7];case 6:throw d=r.sent(),n.error("Dox connectivity error",d),d;case 7:return[2]}})})}},e}();t.StEngine=k},2013:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(311),i=n(1486),o=n(23),a=n(14),s=n(3),l=n(1871),c=n(123),u=function(){function e(e,t,n,i,u,d,p,f,h){var m=this;this._state=e,this._pageVM=t,this._documentModel=n,this._uploadVM=i,this._features=u,this._ded=d,this._settingsModel=p,this._setGoalsVisibilityState=f,this._tourLoadFinished=h,this._subs=[],this._textInProcessing=this._tourLoadFinished.switchMap(s.RxUtils.orEmpty(this._uploadVM.state)).switchMap(function(e){return e===l.UploadViewModel.State.idle?m._pageVM.textInProcessing:o.Observable.empty()}).distinctUntilChanged(),this._isGoalsLoader=this._features.denali.openOnPasteAndUploadMode.contains(c.DenaliFeatures.OpenOnPasteOrUploadMode.goalsLoader),this._goalsWindowWasShownOnce=!1,(g=this._subs).push.apply(g,[this._listenUploadingState()].concat(this._listenProcessingState(),this._listenFullRecheckingState())),s.registerDebugHelper("loader",function(e,t,n){m._state.set({text:a.Option.of(e).filter(function(e){return e in r.DocumentLoader.TextType}),lens:a.Option.of(t).filter(function(e){return e in r.DocumentLoader.Type}),navigation:a.Option.of(n).filter(function(e){return e in r.DocumentLoader.Type})})});var g}return e.prototype._listenUploadingState=function(){var e=this,t=this._features.denali.openOnPasteAndUploadMode.contains(c.DenaliFeatures.OpenOnPasteOrUploadMode.tripleLoader);return this._uploadVM.state.skip(1).subscribe(function(n){e._state.set(n===l.UploadViewModel.State.idle?r.DocumentLoader.State.idle:t||e._isGoalsLoader?r.DocumentLoader.State.loading:r.DocumentLoader.State.text)})},e.prototype._listenProcessingState=function(){var e=this;return[this._pageVM.openedAfterPaste.withLatestFrom(this._pageVM.state).filter(function(e){var t=(e[0],e[1]);return i.PageViewModel.isOpened(t)}).subscribe(function(){e._state.set(r.DocumentLoader.State.lensAndNavigationProcessing)}),this._textInProcessing.map(function(e){return e?r.DocumentLoader.State.processing:r.DocumentLoader.State.idle}).subscribe(s.RxUtils.toAtom(this._state)),this._ded.dontFreezeWhen(this._state.view(function(e){return e.text.nonEmpty()}),"loader")]},e.prototype._showSetGoalsLoader=function(){this._isGoalsLoader&&!this._goalsWindowWasShownOnce&&this._settingsModel.enableSetGoalsLoader.get()&&this._documentModel.isInitialRevision&&this._features.denali.tour.isEmpty()&&(this._setGoalsVisibilityState.set(!0),this._goalsWindowWasShownOnce=!0)},e.prototype._listenFullRecheckingState=function(){var e=this,t=function(e){return e.filter(function(e){return e===r.DocumentLoader.Type.checkingIn||e===r.DocumentLoader.Type.checking}).map(function(){return r.DocumentLoader.Type.checkingOut})};return[this._textInProcessing.switchMap(s.RxUtils.orEmptyRight(this._documentModel.checkingState.withLatestFrom(this._pageVM.state))).subscribe(function(t){var n=t[0],o=t[1];"full"===n&&i.PageViewModel.isOpened(o)?(e._showSetGoalsLoader(),e._state.set({text:a.None,lens:a.Some(r.DocumentLoader.Type.checking),navigation:a.Some(r.DocumentLoader.Type.checking)})):e._state.set(r.DocumentLoader.State.idle)}),this._textInProcessing.switchMap(s.RxUtils.orEmptyRight(this._pageVM.state.withLatestFrom(this._documentModel.checkingState))).subscribe(function(n){var o=n[0];"full"===n[1]?i.PageViewModel.isOpened(o)?(e._showSetGoalsLoader(),e._state.set({text:a.None,lens:a.Some(r.DocumentLoader.Type.checkingIn),navigation:a.Some(r.DocumentLoader.Type.checkingIn)})):e._state.modify(function(e){return{text:a.None,lens:t(e.lens),navigation:t(e.navigation)}}):e._state.set(r.DocumentLoader.State.idle)})]},e.prototype.dispose=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},e}();t.LoaderViewModel=u},2014:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(14),i=n(6),o=n(1463),a=n(3),s=n(1465),l=function(){function e(e,t,n){this._pageVM=e,this._cardsVM=t,this._marksVM=n,this._subs=[],this._log=i.Monitoring.Logging.getLogger("SelectedCardViewModelImpl"),this._subs.push(this._listenCardFocusState(),this._listenMarkFocusState())}return e.prototype.dispose=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},e.prototype._listenCardFocusState=function(){var e=this;return this._pageVM.focusedCard.distinctUntilChanged(function(e,t){return a.isOptionsEq(e,t,function(e,t){return e.cardId===t.cardId})}).scan(function(e,t){return{newFocusedCard:t,oldFocusedCard:e.newFocusedCard}},{newFocusedCard:r.Option.empty(),oldFocusedCard:r.Option.empty()}).filter(function(e){var t=e.oldFocusedCard,n=e.newFocusedCard;return!(t.isEmpty()&&n.isEmpty())}).subscribe(function(t){var n=t.oldFocusedCard,i=t.newFocusedCard;e._log.trace("Change focused card: '"+n.map(function(e){return e.cardId}).getOrElse("N/A")+"' => "+i.map(function(e){return e.cardId}).getOrElse("N/A")+"'");var a=r.Option.map2(i,n,function(e,t){return o.Alert.comparator(t.activeAlert,e.activeAlert)>0}).getOrElse(!0);i.forEach(function(t){e._cardsVM.startTransitionTo(t,{type:"focused",clockwise:a})}),n.map(function(t){if(e._cardsVM.cardScheduledToDispose(t))e._cardsVM.startTransitionTo(t,{type:"removed",clockwise:a});else{var n=i.exists(function(e){return e.activeAlert.lensId===t.activeAlert.lensId});e._cardsVM.startTransitionTo(t,{type:n?"rendered":"fadeOut",clockwise:a})}})})},e.prototype._listenMarkFocusState=function(){var e=this;return this._pageVM.state.view(s.LensState.mapper(function(e){var t=e.currentLens,n=e.alertSource;return r.Some({alert:t.card.activeAlert,alertSource:n})},function(e){var t=e.currentLens,n=e.alertSource;return t.card.map(function(e){return{alert:e.activeAlert,alertSource:n}})})).distinctUntilChanged(function(e,t){return a.isOptionsEq(e,t,function(e,t){return e.alert.id===t.alert.id})}).scan(function(e,t){return{newFocusedAlert:t.map(function(e){return e.alert}),oldFocusedAlert:e.newFocusedAlert,source:t.map(function(e){return e.alertSource})}},{newFocusedAlert:r.Option.empty(),oldFocusedAlert:r.Option.empty(),source:r.Option.empty()}).filter(function(e){var t=e.oldFocusedAlert,n=e.newFocusedAlert;return!(t.isEmpty()&&n.isEmpty())}).map(function(t){var n=t.oldFocusedAlert,r=t.newFocusedAlert,i=t.source;return{oldFocusedMarkAlert:n.flatMap(function(t){return e._marksVM.getMarkAlert(t)}),newFocusedMarkAlert:r.flatMap(function(t){return e._marksVM.getMarkAlert(t)}),source:i}}).withLatestFrom(this._marksVM.highlightedAlert).subscribe(function(t){var n=t[0],i=n.oldFocusedMarkAlert,o=n.newFocusedMarkAlert,a=n.source,s=t[1];e._log.trace("Change focused mark: '"+i.map(function(e){return e.id}).getOrElse("N/A")+"' => "+o.map(function(e){return e.id}).getOrElse("N/A")+"'"),o.forEach(function(t){return e._marksVM.focusMark(t,a)}),i.map(function(t){return e._marksVM.unfocusMark(r.Some(t),s)})})},e}();t.SelectedCardViewModelImpl=l},2015:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(23),i=n(1496),o=n(1465),a=n(3),s=n(1463),l=function(){function e(e,t,n,i){var l=this;this._scrollVM=e,this._marksVM=t,this._pageVM=n,this._alignmentVM=i,this._subs=[],this._alignment=r.Observable.combineLatest(this._scrollVM.activeCardRendered.pairwise().map(function(e){var t=e[0];return e[1].map(function(e){return{card:e,animate:t.exists(function(t){return t.activeAlert.lensId===e.activeAlert.lensId})}})}).switchMap(a.RxUtils.toOptionValueOnly),this._pageVM.state).filter(function(e){var t=e[0].card,n=e[1];return o.LensState.getActiveAlert(n).exists(function(e){return e.id===t.activeAlert.id})&&n.alertSource!==s.AlertActionSource.api}).map(function(e){var t=e[0];return{card:t.card,animate:t.animate,source:e[1].alertSource}}).distinctUntilChanged(function(e,t){return e.card.activeAlert.id===t.card.activeAlert.id&&e.card.height===t.card.height&&e.card.absTop===t.card.absTop}).do(function(e){var t=e.card,n=e.animate,r=e.source;return l._alignCardWithMark(t,n,r)}),this._alertSwitching=this._marksVM.alertClicked.skip(1).switchMap(a.RxUtils.toOptionValueOnly).do(function(e){var t=e.alert;return l._pageVM.switchToAlert(t,s.AlertActionSource.text,"textOrder")}),this._sideEffects=r.Observable.merge(this._alignment,this._alertSwitching).mapTo(a.RxUtils.voidValue),this._subs.push(this._pageVM.state.view(o.LensState.hasCards).switchMap(a.RxUtils.orEmpty(this._sideEffects)).subscribe())}return e.prototype.dispose=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},e.prototype._alignCardWithMark=function(e,t,n){if(n===s.AlertActionSource.text)this._alignmentVM.alignCardToMark(e,t?i.AlignmentAnimation.ANIMATE_ALL:i.AlignmentAnimation.NO_ANIMATION);else if(n===o.ForceAlertActionSource.forceText)this._alignmentVM.alignCardToMark(e,i.AlignmentAnimation.NO_ANIMATION);else{var r=n===s.AlertActionSource.sidebar;this._alignmentVM.alignMarkToCard(e,r?t?i.AlignmentAnimation.ANIMATE_ALL:i.AlignmentAnimation.ANIMATE_MARK:i.AlignmentAnimation.NO_ANIMATION)}},e}();t.SidebarIOViewModel=l},2016:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(23),o=n(14),a=n(7),s=n(43),l=n(1791),c=n(1476),u=n(1477),d=n(585),p=n(3),f=n(1565),h=n(6),m=n(1500),g=function(){function e(e,t,n,r,s,c){var u=this;this._synonymsModel=e,this._pageVM=t,this._networkState=n,this._marksVM=r,this.ded=s,this._notifications=c,this._log=h.Monitoring.Logging.getLogger("synonymsViewModel"),this.viewState=a.Atom.create(o.None),this.popupShown=this.viewState.view(function(e){return e.map(function(e){return e.popupVisible}).getOrElse(!1)}),this._defaultClassName="defaultSynonymClass",this._subs=[],this.shouldHide=function(e){return!d.hasParentWithClassName(e,u._defaultClassName)},this._wordOrNoneAfterTimeout=function(e){return u.viewState.switchMap(function(t){return t.forAll(function(e){return e.synonymsState.kind!==l.SynonymsStateKind.Querying})?i.Observable.timer(3e3).mapTo(o.None):i.Observable.of(e)}).startWith(e)},this._handleState()}return e.prototype.apply=function(e){var t=this,n=this.viewState.get();this._removeSelection(),n.forEach(function(n){var r=n.synonymsState,i=n.activeWord;if(!l.SynonymsModel.isReady(r))throw new p.InvariantError("Synonym should exist.");var o=t._synonymsModel.applySynonym({id:r.synonyms.id,dispose:function(){return t._deregisterRange(r.synonyms.id)},range:i},e);f.createUndoNotification(t.ded,t._notifications,o)})},e.prototype.query=function(e){return this.close(),this.ded.flushChanges(),this._synonymsModel.query(e)},e.prototype.showPopup=function(){s.invariant(this._canShowPopup(this._synonymsModel.state.get())),this.viewState.modify(function(e){return e.map(function(e){return r.__assign({},e,{popupVisible:!0})})})},e.prototype.hidePopup=function(){this.viewState.modify(function(e){return e.map(function(e){return r.__assign({},e,{popupVisible:!1})})}),this.close()},e.prototype.close=function(){var e=this._synonymsModel.state.get();l.SynonymsModel.isReady(e)&&this._deregisterRange(e.synonyms.id),this._synonymsModel.abortQuery(),this._removeSelection()},e.prototype.dispose=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},e.prototype._canShowPopup=function(e){return l.SynonymsModel.isReady(e)||l.SynonymsModel.isEmpty(e)},e.prototype._removeSelection=function(){var e=this;this.viewState.modify(function(t){return t.map(function(t){try{e.ded.changeMarks([c.Mark.getRemoveAction({id:t.activeMark.id,range:function(){return t.activeMark.range}},c.Mark.RemoveType.byPartialMatch)])}catch(t){e._log.error("Cannot remove synonym",t)}}),o.None})},e.prototype._createMark=function(t){return this.ded.changeMarks([c.Mark.getCreateAction({id:e.markId,range:function(e){return t},classes:[this._defaultClassName,m.markHidden],order:0})])[0]},e.prototype._registerRange=function(e,t){var n=e.activeWord,r=this._rangeId(t);!this._synonymsModel.positionManager.findById(r).isEmpty()||this._synonymsModel.positionManager.registerRange(r,n)},e.prototype._deregisterRange=function(e){var t=this,n=this._rangeId(e);this._synonymsModel.positionManager.findById(n).forEach(function(e){return t._synonymsModel.positionManager.deregisterRange(n)})},e.prototype._rangeId=function(e){return e+"s"},e.prototype._handleState=function(){var e=this;this._subs.push(this.ded.clickedWord.filter(function(e){return e.forAll(function(e){return e.type===u.ClickType.dblclick})}).switchMap(p.RxUtils.Scheduler.rafScheduler).withLatestFrom(this._marksVM.alertClicked,function(e,t){return t.isEmpty()?e:o.None}).switchMap(this._wordOrNoneAfterTimeout).distinctUntilChanged(function(e,t){return e.equals(t)}).withLatestFrom(this.viewState.view(function(e){return e.exists(function(e){return e.popupVisible})})).filter(function(e){var t=e[0],n=e[1];return t.nonEmpty()||!n}).map(function(e){return e[0]}).subscribe(function(t){return t.fold(function(){return e.close()},function(t){if("offline"!==e._networkState.getOnlineStatus()){var n=t.range;e.viewState.get().exists(function(e){return e.activeWord.equals(n)&&l.SynonymsModel.isReady(e.synonymsState)})?e.viewState.modify(function(e){return e.map(function(e){return r.__assign({},e,{popupVisible:!0})})}):e.query({start:n.start,word:n.value}).then(function(t){e.viewState.set(o.Some({synonymsState:t,activeWord:n,activeMark:e._createMark(n),popupVisible:e._canShowPopup(t),queryStarted:Date.now()}))}).catch(function(e){return h.Monitoring.Logging.getLogger("SynonymsViewModel").error("Error querying synonyms",e)})}})}),this._synonymsModel.state.subscribe(function(t){e.viewState.modify(function(n){return n.map(function(n){return l.SynonymsModel.isReady(t)&&e._registerRange(n,t.synonyms.id),r.__assign({},n,{synonymsState:t})})})}),i.Observable.merge(this.ded.contentUpdated,this._pageVM.state.view(function(e){return e.currentLens.id})).subscribe(function(){return e.hidePopup()}),this.viewState.subscribe(function(t){return t.forEach(function(t){return t.popupVisible&&e.ded.changeMarks([c.Mark.getUpdateAction({id:t.activeMark.id,range:function(){return t.activeMark.range},order:0},[e._defaultClassName,m.synonym,m.markSelected])])})}))},e.markId="64656E616E69",e}();t.SynonymsViewModelImpl=g},2017:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(6),s=n(122),l=n(1481),c=n(1467),u=n(1461),d=n(1892),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._currentText=o.Atom.create({brief:"",detailed:""}),t}return r.__extends(t,e),t.prototype._sendFeedback=function(e){var t={briefDescription:e.brief,detailedFeedback:e.detailed,email:this.props.email};a.Monitoring.Logging.getLogger("userFeedback").info("User feedback",t),this.props.visible.set(!1),this.context.notifications.showMessage("Your feedback has been sent. Thank you!")},t.prototype.render=function(){var e=this,t=this.props.visible;return i.createElement(l.Overlay,{visible:t,preventClose:!0,animate:!0},i.createElement(l.Modal,{className:d.wrapper},i.createElement(l.Modal.Header,{className:d.feedbackPopupHeader},i.createElement(c.H1,{className:d.header},"Send Product Feedback"),i.createElement(c.P1,{className:d.description},"Tell us what you think. We promise to act on your feedback to make Grammarly even more awesome."),i.createElement(o.F.input,r.__assign({mount:function(e){e&&requestAnimationFrame(function(){return e.focus()})},placeholder:"Brief description"},o.classes(d.inputField,d.briefDescriptionInput),o.bind({value:this._currentText.lens("brief")}))),i.createElement(o.F.textarea,r.__assign({placeholder:"Type your feedback"},o.classes(d.inputField,d.feedbackInput),o.bind({value:this._currentText.lens("detailed")}))),i.createElement(c.P2,null,"If you have a support or billing-related request, please go to"," ",i.createElement("a",{href:this.context.appConfig.support.mainPage,target:"_blank",className:d.helpdesk},"Grammarly Helpdesk"))),i.createElement(l.Modal.Footer,{className:d.feedbackPopupFooter},i.createElement(u.Button.Grey,{name:"cancel",onClick:function(){return t.set(!1)}},"cancel"),i.createElement(u.Button.Blue,{name:"send",disabled:this._currentText.view(function(e){return""===e.brief||""===e.detailed}),onClick:function(){return e._sendFeedback(e._currentText.get())}},"send"))))},t}(s.BaseComponent);t.FeedbackPopup=p},2018:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(24),a=n(7),s=n(122),l=n(1461),c=n(573),u=n(1483),d=n(2017),p=n(600),f=n(125),h=n(1893),m='We will record all your actions with diagnostic purpose, information from the document can be read by a developer. Do you want to continue? You can stop diagnostic recording session at any time by pressing the button "Disable diagnostic mode".',g=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r._showFeedbackPopup=a.Atom.create(!1),r._diagnosticModeEnabled=a.Atom.create(p.Fullstory.isEnabled()),r.toggleDiagnostic=function(){r._diagnosticModeEnabled.get()?r.context.appRouter.forceReloadCurrentLocation():window.confirm(m)&&(p.Fullstory.enable(),r._diagnosticModeEnabled.modify(function(e){return!e}))},r._wootricViewModel=n.wootricViewModel,r}return r.__extends(t,e),t.prototype.render=function(){var e=this,t=this.props.userAccount,n=this.context.appConfig,o=t.profile.get();return i.createElement(a.F.div,{className:h.footer,style:this._wootricViewModel.map(function(e){return e.height.view(function(e){return e>0?{bottom:"calc(1rem + "+e+"px)"}:{}})}).getOrElse(void 0)},i.createElement(u.Dropdown,{showDelay:0,name:"help",label:i.createElement(l.Button.Round,{name:"help-btn",className:this._diagnosticModeEnabled.view(function(e){return e?h.diagnosticMode:""})},i.createElement(c.Icon.QuestionMark,{className:this._diagnosticModeEnabled.view(function(e){return e?h.diagnosticModeIcon:""})}))},i.createElement(l.Button.Flat,{name:"support",href:n.support.mainPage,target:"_blank"},"Support"),i.createElement(l.Button.Flat,{name:"feedback",onClick:function(){e._showFeedbackPopup.set(!0)}},"Send product feedback"),t.features.denali.migratedFromClassic&&i.createElement(l.Button.Flat,{name:"switch-to-classic",onClick:function(){return r.__awaiter(e,void 0,void 0,function(){var e;return r.__generator(this,function(n){switch(n.label){case 0:return e=this.props.docId,this.context.appRouter.navigate(s.Router.routes.editor.href({docId:e}),{showSwitchUINotification:!0}),[4,t.settings.setDocumentMode(e,f.DocumentMode.EditorTs)];case 1:return n.sent(),this.context.gnarSpec.backToClassicButtonClick(this.context.pageId),[2]}})})}},"Back to classic Editor"),i.createElement(u.Dropdown.Delimiter,null),i.createElement(l.Button.Flat,{name:"policy",href:n.privacyPolicy,target:"_blank"},"Privacy Policy"),i.createElement(l.Button.Flat,{name:"terms",href:n.termsOfServise,target:"_blank"},"Terms of Service")),i.createElement(d.FeedbackPopup,{key:"fb",visible:this._showFeedbackPopup,email:o.email}))},t.contextTypes=r.__assign({},s.BaseComponent.contextTypes,{wootricViewModel:o.object}),t}(s.BaseComponent);t.FixedFooter=g},2023:function(e,t,n){"use strict";function r(e){return function(t,n){return e.view(function(e){return e?t:n})}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(13),a=n(7),s=n(573),l=n(1461),c=n(1504),u=n(1521),d=n(1894),p=n(122),f=n(1788),h=n(3),m=n(1465),g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateIn=function(e){return t.props.pageViewModel.state.view(function(t){return t.currentLens.type===e})},t.sidebarOpened=t.props.pageViewModel.sidebarOpened,t.stateMatch=r(t.sidebarOpened),t.trackingPlacement=function(){return t.props.pageViewModel.sidebarOpened.get()?"wiritingAssistant":"writingMode"},t.toProofit=function(e){t.context.gnarSpec.professionalProofreadingButtonClick(t.context.pageId,t.trackingPlacement()),e?t.props.pageViewModel.switchTo(m.LensViewType.proofit):(t._freemiumPlagiarism.set(!1),t._freemiumProofit.set(!0))},t.toPlagiarism=function(e){t.context.gnarSpec.plagiarismButtonClick(t.context.pageId,t.trackingPlacement()),e?t.props.pageViewModel.switchTo(m.LensViewType.plagiarism):(t._freemiumProofit.set(!1),t._freemiumPlagiarism.set(!0))},t.proofitActive=t.stateIn(m.LensViewType.proofit),t.plagiarismActive=t.stateIn(m.LensViewType.plagiarism),t._freemiumPlagiarism=a.Atom.create(!1),t._freemiumProofit=a.Atom.create(!1),t}return i.__extends(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.features,r=t.plagiarismViewModel;return o.createElement(a.F.div,{className:this.stateMatch(d.documentActionsFull,d.documentActionsTeaser)},n.plagiarism.view(function(t){return t.enabled&&o.createElement(l.Button,{onClick:function(){return e.toPlagiarism(!n.isFree)},key:"plagiarism",name:"plagiarism",className:e.stateMatch(d.blockFull,d.blockTeaser),active:a.Atom.combine(e.plagiarismActive,e._freemiumPlagiarism,h.or),title:e.stateMatch("","Plagiarism Check")},o.createElement(a.F.div,{className:e.stateMatch("",d.hidden)},"Plagiarism"),a.Atom.combine(e.plagiarismActive,r.plagiarismViewState,function(e,t){if(!e)return o.createElement(s.Icon.Plagiarism,{className:d.actionIcon,key:"plagiarism-icon"});switch(t.type){case c.PlagiarismViewType.loading:return o.createElement(s.Icon.Plagiarism,{className:d.actionIcon,key:"plagiarism-icon"});case c.PlagiarismViewType.originality100:case c.PlagiarismViewType.cards:return o.createElement(u.Counters.PlagiarismMeter,{key:"plagiarism-counter",className:d.actionIcon,isChecking:r.checkingState.view(function(e){return"checking"===e.type}),count:r.checkingState.view("percent").switch()});default:return h.assertNever(t)}}))}),n.proofitToolbarItem.view(function(t){return t.enabled&&o.createElement(l.Button,{key:"proofit",name:"proofread",className:e.stateMatch(d.blockFull,d.blockTeaserBig),title:e.stateMatch("","Human Proofreading"),active:a.Atom.combine(e.proofitActive,e._freemiumProofit,h.or),onClick:function(){return e.toProofit(n.proofit.get().enabled)}},o.createElement(a.F.div,{className:e.stateMatch("",d.hidden)},"Human Proofreader"),o.createElement(s.Icon.Proofread,{className:d.actionIcon}))}),n.isFree&&[o.createElement(f.Freemium.Plagiarism,{key:"free-plagiarism",upgradeViewModel:this.props.upgradeViewModel,visible:this._freemiumPlagiarism}),o.createElement(f.Freemium.ProfessionalProofreaders,{key:"free-proofit",upgradeViewModel:this.props.upgradeViewModel,visible:this._freemiumProofit})])},t}(p.BaseComponent);t.DocumentActions=g},2024:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(1486),s=n(1802),l=n(1501),c=n(1485),u=n(122),d=n(1461),p=n(573),f=n(1703),h=n(311),m=n(1873),g=n(1895),v=n(1866),_=n(1896),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(l.AnimationWrapper),y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._stateToClassSidebarMapper=function(e,t){return!e||a.PageViewModel.isForceSidebar(t)?{prev:{start:{},end:{}},next:{start:{},end:{}}}:a.PageViewModel.isOpened(e)?{prev:{start:{base:v.navigationLeaveRightStart},end:{base:v.navigationLeaveRight}},next:{start:{},end:{}}}:{prev:{start:{},end:{}},next:{start:{base:v.navigationEnterLeftStart},end:{base:v.navigationEnterLeft}}}},t}return r.__extends(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.pageViewModel,s=t.documentModel;return i.createElement("div",{className:g.navigationWrapper},i.createElement(b,{key:"lensWrapper",state:n.state.distinctUntilChanged(function(e,t){return a.PageViewModel.isOpened(e)===a.PageViewModel.isOpened(t)}),stateToClassMapper:this._stateToClassSidebarMapper,className:g.fullHeight},function(t){var l=t.state,c=t.view;return a.PageViewModel.isOpened(l)?i.createElement(o.F.div,r.__assign({key:"sidebar"},o.classes(c.map(function(e){return e.base}),n.sidebarOpened.view(function(e){return e?g.wrapper:g.narrowWrapper}))),s.checkingState.view(function(t){return"full"===t?null:e._renderNavigation()})):null}))},t.prototype._renderNavigation=function(){var e=this.props,t=e.pageViewModel,n=e.sidebarViewModel,r=e.documentModel,o=e.features,a=e.setGoalsVisibilityState,l=e.insightsVisibilityState;return[i.createElement(w,{key:"navigation-header",pageViewModel:t,sidebarViewModel:n,documentModel:r,setGoalsState:a,insightsState:l}),i.createElement(s.LensesNavigation,{key:"navigation-lenses",pageViewModel:t,sidebarViewModel:n,features:o})]},t}(u.BaseComponent);t.Navigation=y;var w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype._getSetGoalsIcon=function(e){return 0===e?i.createElement(p.Icon.GoalsEmpty,r.__assign({key:"goals-empty"},o.classes(g.actionIcon,g.goalsCornerState))):100===e?i.createElement(p.Icon.GoalsComplete,r.__assign({key:"goals-complete"},o.classes(g.actionIcon,g.goalsCornerState))):i.createElement(p.Icon.GoalsPartial,{key:"goals-partial",className:g.actionIcon,percentage:e})},t.prototype.render=function(){var e=this.props,t=e.setGoalsState,n=e.insightsState,a=this.props.documentModel.contextCompleteness,s=this.context,l=s.gnarSpec,u=s.pageId;return i.createElement(o.F.header,r.__assign({key:"header"},o.classes(g.headerWrapper)),i.createElement(c.Onboarding,{key:"actions-onboarding-insights",alignment:"bottomFlexible",eventType:"onclick",stepId:"step8",title:"Document statistics",message:"See how your writing stacks up against other Grammarly users.",findFirstButton:{dotPosition:"center",buttonOrder:0,notificationPosition:"underButton"},themes:{containerWrapperClassName:g.insightsOnboardingContainer,notificationClassName:g.goalsOnboardingNotification,triangleClassName:g.goalsTriangleClassName}},i.createElement(d.Button.SidebarFlat,{name:"insights",active:n,disabled:n,onClick:function(){n.set(!0),l.documentStatisticsButtonClick(u)}},i.createElement("div",null,"Insights"),i.createElement(p.Icon.Insights,{className:g.actionIcon}))),i.createElement(c.Onboarding,{key:"actions-onboarding-set-goals",alignment:"bottomFlexible",eventType:"onclick",stepId:"step1",title:"Set Goals",message:"Tell Grammarly about your writing goals to receive more precise suggestions.",findFirstButton:{dotPosition:"center",buttonOrder:0,notificationPosition:"underButton"},themes:{containerWrapperClassName:g.goalsOnboardingContainer,notificationClassName:g.goalsOnboardingNotification,triangleClassName:g.goalsTriangleClassName}},i.createElement(d.Button.SidebarFlat,{name:"set-goals",active:t,disabled:t,onClick:function(){t.set(!0),l.setGoalsButtonClick(u)}},a.view(function(e){return 0===e?"Set goals":"Update goals"}),a.view(this._getSetGoalsIcon))),i.createElement("div",{className:g.delimiter,key:"delimiter"}))},t}(u.BaseComponent);t.NavigationHeader=w,function(e){var t=_;e.Loader=function(e){var n=e.baseLoaderClass,a=e.state;return i.createElement(m.SidebarLoader,{state:a.view("navigation"),theme:t},i.createElement(o.F.div,r.__assign({},o.classes(g.navigationLoaderWrapper,n,a.view("text").view(function(e){return e.isEmpty()&&g.navigationLoaderWithToolbar}))),i.createElement(o.F.div,{className:a.view("lens").view(function(e){return e.fold(function(){return g.fullHeightLoader},function(e){return e===h.DocumentLoader.Type.checkingOut?g.fullHeightLoaderNavigation:g.fullHeightLoader})})},i.createElement(o.F.div,{className:a.view("lens").view(function(e){return e.fold(function(){return g.loaderWrapperNoShadow},function(e){return e===h.DocumentLoader.Type.checkingOut?g.loaderWrapperNoShadow:g.loaderWrapper})})},i.createElement(f.Rechecking,{key:"rechecking"})))))}}(y=t.Navigation||(t.Navigation={})),t.Navigation=y},2025:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(13),i=n(122),o=n(1461),a=n(1467),s=n(1989),l=n(1897);t.DocumentNotFound=i.withContext(function(e,t){var n=t.appRouter;return r.createElement("div",{"data-name":"doc-not-found",className:l.wrapper},r.createElement(s.GrammarlyLogo,{className:l.logo}),r.createElement(c,{className:l.img}),r.createElement(a.H1,{className:l.title},"Can’t find this document"),r.createElement(a.Paper,{className:l.info},"It looks like this document was removed or URL is incorrect."),r.createElement(o.Button.Blue,{name:"to-doc-list",className:l.toHome,onClick:function(){return n.navigate(i.Router.routes.documents.href({}))}},"Go to your documents"))});var c=function(e){var t=e.className;return r.createElement("svg",{width:"194",height:"128",viewBox:"0 0 194 128",className:t},r.createElement("g",{fill:"none",fillRule:"evenodd"},r.createElement("path",{d:"M44 40h64c2.2 0 4 1.8 4 4v80c0 2.2-1.8 4-4 4H45c-2.76 0-5-2.24-5-5V44c0-2.2 1.8-4 4-4z",fill:"#E4E6F2",opacity:".8"}),r.createElement("rect",{stroke:"#8189A9",strokeWidth:"1.5",fill:"#FFF",strokeLinecap:"round",strokeLinejoin:"round",x:"47",y:"33",width:"72",height:"88",rx:"1"}),r.createElement("path",{d:"M60.28 86h44.67M60.28 96h44.67M60.28 107H73",stroke:"#E4E6F2",strokeWidth:"2",fill:"#FFF",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("g",{transform:"translate(64 47)"},r.createElement("circle",{fill:"#8189A9",cx:"3",cy:"3",r:"3"}),r.createElement("circle",{fill:"#8189A9",cx:"33",cy:"3",r:"3"}),r.createElement("path",{d:"M29.46 21.54C26.66 18.74 22.78 17 18.5 17c-4.28 0-8.16 1.73-10.96 4.54",stroke:"#8189A9",strokeWidth:"2",strokeLinecap:"round"})),r.createElement("path",{d:"M188.13 106.03c.3.3.3.8-.1 1.1-.1.1-.3.2-.5.2s-.4-.1-.5-.2l-1.8-1.8c-.3-.3-.3-.8 0-1.1.3-.3.8-.3 1.1 0l1.8 1.8zm3.9 4l1.7 1.8c.3.3.3.8 0 1.1-.1.1-.3.2-.5.2s-.4-.1-.5-.2l-1.8-1.8c-.3-.3-.3-.8 0-1.1.3-.3.8-.3 1.1 0zm-5 0c.3-.3.8-.3 1 0 .3.3.3.8 0 1.1l-1.8 1.8c-.1.1-.3.2-.5.2s-.4-.1-.5-.2c-.3-.3-.3-.8 0-1.1l1.8-1.8zm6.8-5.7c.3.3.3.8-.1 1.1l-1.8 1.8c-.1.1-.3.2-.5.2s-.4-.1-.5-.2c-.3-.3-.3-.8 0-1.1l1.8-1.8c.3-.3.8-.3 1.1 0zM86.03 3.13l-1.8-1.8c-.3-.3-.3-.8 0-1.1.3-.3.8-.3 1.1 0l1.7 1.8c.3.3.3.8 0 1.1-.1.1-.3.2-.5.2s-.4-.1-.5-.2zm5.7 5.6l-1.9-1.8c-.3-.3-.3-.8 0-1.1.3-.3.8-.3 1.1 0l1.8 1.8c.3.3.3.8 0 1.1-.1.1-.3.2-.5.2s-.4-.1-.5-.2zm-6.9.2c-.2 0-.4 0-.5-.1-.3-.3-.3-.8 0-1.1l1.7-1.9c.3-.3.8-.3 1.1 0 .3.3.3.8 0 1.1l-1.8 1.8c-.1.1-.3.2-.5.2zm5.7-5.6c-.2 0-.4-.1-.6-.2-.3-.3-.3-.8 0-1.1l1.8-1.8c.3-.3.8-.3 1.1 0 .3.3.3.8 0 1.1l-1.8 1.8c-.1.1-.3.2-.5.2z",fill:"#F6C2CB",fillRule:"nonzero"}),r.createElement("path",{d:"M4.6 60.2c2.2 0 3.9-1.8 3.9-3.9 0-2.2-1.8-3.9-3.9-3.9-2.2 0-3.9 1.8-3.9 3.9 0 2.1 1.7 3.9 3.9 3.9zm0-6.3C5.9 53.9 7 55 7 56.3c0 1.3-1.1 2.4-2.4 2.4-1.3 0-2.4-1.1-2.4-2.4 0-1.4 1.1-2.4 2.4-2.4z",fill:"#A1E7D7",fillRule:"nonzero"})))}},2028:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(24),a=n(23),s=n(7),l=n(122),c=n(1806),u=n(2043),d=n(1464),p=n(1501),f=n(1486),h=n(2044),m=n(1803),g=n(2039),v=n(1465),_=n(2024),b=n(1801),y=n(1814),w=n(3),E=n(2023),k=n(311),x=n(1873),S=n(2047),C=n(1866),M=n(1903),A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(p.AnimationWrapper),O=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r._subs=[],r._statePriority=[v.LensViewType.closed,v.LensViewType.lensview,v.LensViewType.advanced,v.LensViewType.plagiarism,v.LensViewType.proofit],r._withClass=function(e){return function(t){return[t,e].join(" ")}},r._stateToClassMapper=function(e,t){if(e&&f.PageViewModel.isOpened(e)){if(f.PageViewModel.isOpened(t)){if(t.alertSource===v.ForceAlertActionSource.forceSidebar||t.alertSource===v.ForceAlertActionSource.forceText)return{prev:{start:{base:C.lensHideStart},end:{base:C.lensHide}},next:{start:{},end:{}}};if(r._isFocusedLensLike(t.currentLens)&&r._isFocusedLensLike(e.currentLens)){var n="textOrder"===t.switchOrder?C.lensMoveUp:d.Lens.comparator(e.currentLens.meta,t.currentLens.meta)>0?C.lensMoveDown:C.lensMoveUp,i=r._withClass(n);return{prev:{start:{base:i(C.lensLeaveStart),title:i(C.lensLeaveStartTitle),content:i(C.lensLeaveStartContent)},end:{base:i(C.lensLeave),title:i(C.lensLeaveTitle),content:i(C.lensLeaveContent)}},next:{start:{base:i(C.lensEnterStart),title:i(C.lensEnterStartTitle),content:i(C.lensEnterStartContent)},end:{base:i(C.lensEnter),title:i(C.lensEnterTitle),content:i(C.lensEnterContent)}}}}var o=r._statePriority.indexOf(e.currentLens.type),a=r._statePriority.indexOf(t.currentLens.type),n=o-a>0?C.up:C.down,i=r._withClass(n);return{prev:{start:{base:i(C.stateLeaveStart)},end:{base:i(C.stateLeave)}},next:{start:{base:i(C.stateEnterStart)},end:{base:i(C.stateEnter)}}}}return{prev:{start:{base:C.sidebarLeaveRightStart},end:{base:C.sidebarLeaveRight}},next:{start:{},end:{}}}}return{prev:{start:{},end:{}},next:{start:{base:C.sidebarEnterLeftStart},end:{base:C.sidebarEnterLeft}}}},r._state=r.props.pageViewModel.state.distinctUntilChanged(function(e,t){return e.currentLens.id===t.currentLens.id}).share(),r.setGoalsVisibilityState=r.props.setGoalsVisibilityState,r.insightsVisibilityState=s.Atom.create(!1),r._wootricViewModel=n.wootricViewModel,r}return r.__extends(t,e),t.prototype._isFocusedLensLike=function(e){return e.type===v.LensViewType.lensview||e.type===v.LensViewType.advanced},t.prototype.componentDidMount=function(){var e=this.props.scrollViewModel;this._subs.push(this.props.pageViewModel.sidebarOpened.switchMap(w.RxUtils.orEmpty(a.Observable.create(function(){var t=e.setupSidebar().unsubscribe;return function(){return requestAnimationFrame(t)}}))).subscribe())},t.prototype.componentWillUnmount=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},t.prototype.render=function(){var e=this.props.pageViewModel;return i.createElement(t.Tier,{className:e.sidebarOpened.view(function(e){return!e&&C.hiddenWrapper}),style:this._wootricViewModel.map(function(e){return e.height.view(function(e){return e>0?{height:"calc(100vh - "+e+"px)"}:{}})}).getOrElse(void 0)},i.createElement(t.Wrapper,null,this._renderSidebar(),this._renderNavigation()),this._renderActions(),i.createElement(S.SuccessLensView.Preload,null))},t.prototype._renderNavigation=function(){var e=this.props,t=e.sidebarViewModel,n=e.pageViewModel,r=e.documentModel,o=e.features,a=e.upgradeViewModel,s=e.reportViewModel,l=e.settingsModel;return[i.createElement(_.Navigation,{key:"navigation",pageViewModel:n,sidebarViewModel:t,features:o,documentModel:r,setGoalsVisibilityState:k.DocumentLoader.SetGoalsVisibilitySource.toVisible(this.setGoalsVisibilityState,"user"),insightsVisibilityState:this.insightsVisibilityState}),i.createElement(b.SetGoalsModal,{features:o,documentModel:r,visible:this.setGoalsVisibilityState,key:"set-goals-modal",upgradeViewModel:a,settingsModel:l}),i.createElement(y.StatisticsModal,{documentModel:r,visible:this.insightsVisibilityState,reportViewModel:s,key:"statistics-modal"})]},t.prototype._renderActions=function(){var e=this.props,t=e.pageViewModel,n=e.plagiarismViewModel,r=e.successLensViewModel,o=e.upgradeViewModel,a=e.sidebarViewModel,s=e.documentModel,l=e.features;return i.createElement("div",{key:"sidebar-actions",className:C.actionsWrapper},i.createElement(h.SidebarHeader,{successLensViewModel:r,pageViewModel:t,sidebarViewModel:a,documentModel:s,features:l}),i.createElement(E.DocumentActions,{key:"documentActions",pageViewModel:t,plagiarismViewModel:n,sidebarViewModel:a,features:l,upgradeViewModel:o}))},t.prototype._renderSidebar=function(){var e=this,t=this.props,n=t.successLensViewModel,o=t.sidebarViewModel,a=t.scrollViewModel,l=t.pageViewModel,d=t.documentModel,p=t.proofitViewModel,f=t.cardsVM,h=t.marksVM,_=t.upgradeViewModel,b=t.subscription,y=t.plagiarismViewModel,E=t.alignmentViewModel,k=t.features;return i.createElement(A,r.__assign({key:"animationWrapper"},s.classes(d.checkingState.view(function(t){return"full"===t&&"lensview"===e.state?C.fadedWrapper:C.wrapper})),{state:this._state,stateToClassMapper:this._stateToClassMapper}),function(e){switch(e.state.currentLens.type){case v.LensViewType.closed:return null;case v.LensViewType.success:return i.createElement(S.SuccessLensView,{key:"success-view",transition:e.view,successLensViewModel:n,onTransitionEnd:"prev"===e.type?e.done:w.noop,features:k});case v.LensViewType.plagiarism:return i.createElement(u.PlagiarismView,{key:"plagiarism-view","data-name":"plagiarism-view",transition:e.view,pageViewModel:l,plagiarismViewModel:y,marksVM:h,cardsVM:f,scrollVM:a,alignmentVM:E,isMaster:"next"===e.type,onTransitionEnd:"prev"===e.type?e.done:w.noop});case v.LensViewType.proofit:return i.createElement(m.ProofitSidebarView,{key:"proofit",proofit:p,transition:e.view,subscription:b});case v.LensViewType.advanced:return i.createElement(g.PaidView,{"data-name":"paidview",key:"paidview",transition:e.view,upgradeViewModel:_,sidebarViewModel:o,features:k});case v.LensViewType.lensview:var t=e.state.currentLens.meta;return i.createElement(c.Lensview,{"data-name":"lensview",transition:e.view,marksVM:h,cardsVM:f,pageViewModel:l,scrollVM:a,lens:t,key:t.id,alignmentVM:E,isMaster:"next"===e.type,onTransitionEnd:"prev"===e.type?e.done:w.noop});default:return w.assertNever(e.state.currentLens)}})},t.contextTypes=r.__assign({},l.BaseComponent.contextTypes,{wootricViewModel:o.object}),t}(l.BaseComponent);t.Sidebar=O,function(e){e.Tier=function(e){var t=e.children,n=e.className;return i.createElement(s.F.div,r.__assign({},s.classes(C.sidebarTier,n),{style:C}),t)},e.Wrapper=function(e){var t=e.children;return i.createElement(s.F.div,{key:"sidebar","data-name":"sidebar",className:C.sidebarWrapper},t)};var t=M;e.Loader=function(n){var o=n.state,a=n.baseLoaderClass;return i.createElement(e.Tier,null,i.createElement(e.Wrapper,null,i.createElement(x.SidebarLoader,{state:o.view("lens"),theme:t},i.createElement(s.F.div,r.__assign({},s.classes(C.loaderWrapper,a,o.view("text").view(function(e){return e.isEmpty()&&C.loaderWithToolbar}))),i.createElement(c.Lensview.Rechecking,{"data-name":"lensviewRechecking",key:"lensview-rechecking"}))),i.createElement(_.Navigation.Loader,{key:"navigation-rechecking",baseLoaderClass:a,state:o})))}}(O=t.Sidebar||(t.Sidebar={})),t.Sidebar=O},2039:function(e,t,n){"use strict";function r(e,t){switch(e){case 1:return t.opacity90;case 2:return t.opacity80;case 3:return t.opacity70;case 4:return t.opacity60;case 5:return t.opacity50;default:return""}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(13),a=n(14),s=n(7),l=n(122),c=n(312),u=n(1467),d=n(1542),p=n(1521),f=n(1489),h=n(1546),m=n(3),g=n(1899),v=n(1529),_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._browserInfo=m.BrowserInfo.getBrowserInfo(),t._advancedAlerts=t.props.sidebarViewModel.premium.map(function(e){return a.Some(e.count>0?t._groupAdvancedAlerts(t.props.upgradeViewModel.getAdvancedAlerts()):[]).filter(m.notEmpty)}).startWith(a.None),t}return i.__extends(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.transition,a=t.features;return o.createElement(s.F.div,i.__assign({},s.classes(g.wrapper,n.map(function(e){return e.base}))),o.createElement(h.SidebarHeader,{title:a.denali.alertGroupNames===c.AlertGroupNames.CRITICAL_ADVANCED?this.context.textResources.denali.sidebar.advancedIssues:this.context.textResources.denali.sidebar.premiumAlerts,theme:{title:s.classes(n.map(function(e){return e.title}),g.headerTitle).className,wrapper:v.header}}),o.createElement(s.F.div,i.__assign({},s.classes(n.map(function(e){return e.content}))),o.createElement(f.ScrollBarY,{name:"advanced",allowHover:!0,className:v.contentWrapper},this._advancedAlerts.map(function(t){return t.map(function(t){var n=t.reduce(function(e,t){return e+t.count},0);return[o.createElement("div",{key:"some",className:g.advancedBlockWrapper},o.createElement(u.P2,null,"We found"," ",o.createElement("b",null,n," additional writing ",1===n?"issue":"issues"),o.createElement("br",null),"in this text available only for Premium users."),o.createElement("div",{key:"advanced-block",className:g.advancedBlock},o.createElement("div",{className:g.alertList},t.map(function(e,t){return o.createElement(u.P2,{key:e.name,className:g.alertBlock},o.createElement(p.Counters.Counter,{count:e.count,type:"yellow",theme:{counterWrapper:s.classes(g.counter,r(t,g)).className}}),e.name)})),o.createElement("div",{className:g.graphBlock},o.createElement("div",i.__assign({},s.classes(t.length<=4?g.graphCircle3Empty:g.graphCircle3)),o.createElement("div",{className:g.graphCircle2},o.createElement("div",{className:g.graphCircle1},o.createElement(u.H1,i.__assign({},s.classes(g.graphCounter,"windows"===e._browserInfo.os&&g.graphCounterWin)),n))))))),o.createElement("div",{key:"upgrade-block",className:g.upgradeBlock},o.createElement(d.UpgradeButton,{size:"big",upgradeViewModel:e.props.upgradeViewModel,place:"editorDenaliAdvanced"})),o.createElement("footer",{key:"footer",className:g.footer},o.createElement(u.P1,{className:g.footerText},"It’s an online service that quickly and easily makes",o.createElement("br",null),"your writing better and makes you sound like a pro,",o.createElement("br",null),"or at least helps you avoid looking like a fool."),o.createElement(b,{className:g.footerLogo}))]}).orNull()}))))},t.prototype._groupAdvancedAlerts=function(e){var t=e.reduce(function(e,t){return void 0===e[t.categoryHuman]&&(e[t.categoryHuman]=0),e[t.categoryHuman]+=1,e},{}),n=Object.keys(t).map(function(e){return{name:e,count:t[e]}}).sort(function(e,t){return t.count-e.count}),r=n.slice(0,5),i=n.slice(5).map(function(e){return e.count}).reduce(m.sum,0);return i>0?r.concat([{name:"more...",count:i}]):r},t}(l.BaseComponent);t.PaidView=_;var b=function(e){var t=e.className;return o.createElement("svg",{width:"77",height:"20",viewBox:"0 0 77 20",className:t},o.createElement("path",{d:"M15.58138.367837l.088647 5.412045-.885505.275407c-.884542-2.75209-2.12367-4.31141-4.51328-4.31141H7.17438c-.08961 1.742595-.177293 4.67895-.177293 7.797587l2.12367-.091142c1.327775 0 1.94734-1.100637 2.212316-2.660947h.796858v6.512683h-.796858c-.264977-1.559318-.88454-2.659955-2.212317-2.659955l-2.12367-.091142c0 2.38455.087682 4.310417.177293 5.504178.17633 1.742594.6186 2.568815 1.769082 2.659957l1.0628.184266v.734088H.004586v-.734087l.885505-.184266c1.150482-.091142 1.592753-.917363 1.769083-2.659956.178257-2.84323.266904-8.80708 0-12.108993-.17633-1.743584-.6186-2.477673-1.769083-2.660947l-.885505-.092133v-.82523H15.58138zm31.331168 5.319616c3.009175 0 5.31014 2.75308 5.31014 6.514664 0 4.77108-2.831883 7.797586-7.522457 7.797586-1.682362 0-3.363762-.274417-4.956514-.641956.088647-1.92686.177294-13.670294 0-15.87058-.177294-1.101627-.44227-1.560308-1.23913-1.743583l-.619563-.092132v-.549824L43.814726 0c-.088647.918354-.088647 3.57831-.088647 6.513674.97415-.550814 1.94734-.82622 3.186468-.82622zM20.62606 5.50517c4.425597 0 6.638878 3.118637 6.638878 7.24677 0 3.94486-2.478258 7.247763-6.903855 7.247763-4.425598 0-6.637915-3.118638-6.637915-7.247763 0-3.943868 2.478258-7.24677 6.902892-7.24677zm32.74759 7.3392c0-3.761584 2.300964-7.339895 6.815208-7.339895 3.716423 0 5.487433 2.845213 5.487433 6.605807h-8.23163c-.088646 3.394045 1.50507 5.870727 4.691538 5.870727 1.41546 0 2.12367-.36556 3.009175-1.008506l.353624.45868C64.613492 18.715098 62.667117 20 60.188857 20c-3.983325 0-6.815207-2.935364-6.815207-7.15563zm22.83408-6.604815l.088646 3.57732-.6186.183274c-.79686-2.477674-1.858694-3.48618-3.45241-3.48618-1.061835 0-1.858693.82523-1.858693 2.018 0 1.193762.88454 1.835718 3.3628 2.844223 2.301926.917363 3.275114 2.018 3.275114 3.94486C77.004587 18.164282 74.79227 20 71.340824 20c-1.682362 0-3.629702-.36655-4.691538-.82523l-.088646-4.036992.619564-.184265c.974152 2.75209 2.21328 3.761584 3.89468 3.761584 1.416422 0 2.212317-1.009495 2.212317-2.110133 0-1.100637-.619563-1.743584-2.83188-2.567824-2.124634-.73508-3.62874-1.743584-3.62874-4.128133 0-2.38653 2.035987-4.404532 5.31014-4.404532 1.592752 0 3.009174.275407 4.07101.73508zM38.77024 5.87152l-1.416424 3.761584c-1.770046-1.19277-3.716423-.641956-4.159657 0-.087684 2.202266-.087684 5.687453.088646 7.432028.088647 1.099647.354587 1.64947 1.23913 1.741603l1.061834.092132v.73409h-8.230667v-.73409l.619564-.092132c.796858-.092133 1.150482-.641956 1.23913-1.741603.088646-1.92686.177293-5.780576 0-7.982842-.088648-1.19277-.442272-1.65046-1.23913-1.742593l-.619564-.092133V6.69774l5.929703-1.19277-.088647 3.21077c1.416422-3.302902 4.071973-3.761583 5.57608-2.84422zm6.107285 13.118687c1.85773 0 3.185505-2.84323 3.185505-6.513674 0-2.935363-1.061835-5.319913-3.009175-5.319913-.44227 0-.795895.091142-1.327776.275408-.087684 4.77009 0 10.183125.088646 11.467037.26594.091142.70821.091142 1.0628.091142zM20.361083 6.422532c-1.94734 0-2.478258 2.75209-2.478258 6.329408 0 3.486178.885505 6.3304 2.655552 6.3304 2.035023 0 2.566904-2.75209 2.566904-6.3304 0-3.486177-.885504-6.329408-2.744197-6.329408zm37.083577 4.679245l4.159657-.092133c0-1.834726-.264977-4.586815-1.769082-4.586815-1.50507 0-2.301928 2.567823-2.390575 4.678947z",fill:"#C6CBDE",fillRule:"evenodd"}))}},2041:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(122),s=n(1488),l=n(1811),c=n(1810),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._state=o.Atom.create({alerts:[],index:0}),t._getFirstAlert=function(){return t._state.get().alerts[0]},t}return r.__extends(t,e),t.prototype.componentWillMount=function(){this._state.set({alerts:this.props.card.alerts,index:this.props.card.activeAlertIndex})},t.prototype.componentWillReceiveProps=function(e){this._state.set({alerts:e.card.alerts,index:e.card.activeAlertIndex})},t.prototype.render=function(){var e=this,t=this.props,n=t.card,o=t.marksVM,a=t.cardsVM,u=t.pageViewModel,d=t.plagiarismViewModel,p=function(){return i.createElement(l.Mini,r.__assign({cardId:n.cardId,getAlert:e._getFirstAlert},{marksVM:o,pageViewModel:u}))},f=function(){return i.createElement(c.Full,{card:n,state:e._state,pageViewModel:u,plagiarismViewModel:d})};return i.createElement(s.BaseCard.Card,r.__assign({},{renderMiniCard:p,renderFullCard:f},{cardsViewModel:a,cardState:a.getState(n).map(function(e){return[n,e]})}))},t}(a.BaseComponent);t.PlagiarismCard=u},2042:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(1900),o=n(7),a=n(13),s=n(1494),l=n(122);t.Originality100=l.withContext(function(e,n){return a.createElement("div",{className:i.content},a.createElement("div",{className:i.originality100Text},n.textResources.denali.plagiarism.originalText),a.createElement(t.Illusration,{className:i.illusration}))}),t.Loading=function(){return a.createElement("div",{className:i.content},a.createElement(s.Spinner,{variation:"violet",className:i.loader}),a.createElement("div",{className:i.loadingText},"Please wait.",a.createElement("br",null),"We’re checking your text against billions of web pages.",a.createElement("br",null),"It'll just take a moment."))},t.Illusration=function(e){var t=e.className;return a.createElement("svg",r.__assign({},o.classes(t),{width:"334",height:"375",viewBox:"0 0 334 375",xmlns:"http://www.w3.org/2000/svg"}),a.createElement("g",{fill:"none",fillRule:"evenodd"},a.createElement("path",{d:"M160.3 199.297C145.842 196.217 135 183.375 135 168c0-17.673 14.327-32 32-32 17.673 0 32 14.327 32 32 0 14.726-9.947 27.128-23.488 30.856 1.032-4.938 2.81-9.608 5.193-13.675.144-.214.215-.357.36-.572 1.504-2.576 2.15-5.438 2.006-8.372-.214-4.15-2.15-7.943-5.088-10.52l-1.362-1.144c-2.222-1.574-4.874-2.576-7.74-2.72-4.302-.285-8.315 1.146-11.47 4.08-3.08 2.862-4.8 6.94-4.8 11.09 0 2.362.5 4.652 1.576 6.727.358.787.716 1.43 1.218 2.075 2.323 4.075 3.954 8.634 4.895 13.472z",fill:"#F7EAF7"}),a.createElement("path",{d:"M176.62 164.617c-2.222-1.577-4.874-2.58-7.74-2.723-4.302-.287-8.315 1.146-11.47 4.085-3.08 2.866-4.8 6.952-4.8 11.11 0 2.364.5 4.658 1.576 6.736.358.79.716 1.434 1.218 2.08 2.365 4.156 4.014 8.815 4.946 13.76.286 1.362.5 2.796.645 4.158.358 1.075 1.075 1.72 2.007 1.935.215 1.36 1.29 2.507 2.795 3.01l1.147.286c.286.07.645.07.93.07.647 0 1.292-.07 1.865-.285 0 0 1.002-.358 1.002-.43 1.076-.644 1.792-1.576 1.936-2.65 1.003-.288 1.792-1.148 2.078-2.223.072-.86.215-1.65.36-2.437.93-5.734 2.866-11.18 5.59-15.84.143-.215.214-.36.358-.574 1.505-2.58 2.15-5.447 2.007-8.386-.214-4.157-2.15-7.956-5.088-10.536l-1.362-1.147zm-8.745 19.71c.932.718 2.294 1.506 3.728 1.864-1.076 3.872-1.936 9.463-2.222 11.254h-3.01c-.286-1.79-1.147-7.454-2.222-11.253 1.434-.357 2.796-1.074 3.727-1.862zm-1.29-3.08c0-.073-.143-1.506 1.075-1.72h.36c1.217.214 1.074 1.647 1.074 1.72-.072.716-.79 1.432-1.29 1.79-.43-.43-1.147-1.074-1.22-1.79zm-1.003 17.344c.143.073.215.145.358.073.072 0 .144-.072.215-.072h3.297c.072.073.144.073.215.073h.072c.142 0 .214-.072.286-.072h4.3c-.143.79-.287 1.506-.43 2.295 0 .072 0 .143-.072.287h-12.04c-.073-.574-.144-1.147-.288-1.65-.07-.286-.143-.572-.215-.86l4.302-.07zm2.293 9.462c-1.79 0-3.368-.93-3.727-2.222h7.383c-.286 1.29-1.863 2.222-3.655 2.222zm3.943-3.297h-7.956c-.79 0-1.506-.5-1.792-1.147-.072-.43-.144-.93-.144-1.36h11.898c-.07.357-.07.715-.143 1.074-.214.86-.93 1.433-1.862 1.433zm10.106-28.455c.143 2.724-.502 5.376-1.792 7.67v.07c-.143.216-.215.43-.36.646-2.292 3.87-3.94 8.243-5.087 12.83h-4.23c.287-1.935 1.148-7.382 2.223-11.11.573.072 1.146.072 1.648-.07 1.22-.36 1.72-1.578 1.65-2.58-.073-.933-.646-1.578-1.435-1.722-.5-.07-1.432.144-1.934 1.29-.215.502-.43 1.147-.645 1.864-1.146-.287-2.364-.932-3.153-1.505.574-.502 1.362-1.29 1.434-2.365.072-1.22-.5-2.652-2.006-2.867H167.59c-1.506.287-2.08 1.72-2.008 2.868.072 1.075.86 1.863 1.433 2.365-.788.573-2.007 1.218-3.153 1.505-.215-.717-.43-1.362-.645-1.864-.502-1.146-1.434-1.36-1.936-1.29-.787.072-1.36.79-1.432 1.72-.072 1.004.43 2.222 1.648 2.58.502.144 1.076.144 1.65.072 1.002 3.656 1.934 9.103 2.22 11.11h-4.228c-1.003-4.372-2.58-8.458-4.66-12.185-.357-.644-.787-1.29-1.146-1.934 0 0 0-.072-.07-.072-.933-1.935-1.435-4.085-1.435-6.235 0-3.872 1.65-7.67 4.516-10.322 2.867-2.724 6.665-4.014 10.608-3.8 2.653.216 5.16 1.076 7.24 2.58.07.073.143.144.215.144 3.082 2.366 5.304 6.236 5.52 10.608zm-8.96 9.03c.215-.644.43-1.217.574-1.647.286-.717.788-.645.788-.645.43.07.502.573.502.717.072.573-.215 1.29-.86 1.433-.287.143-.645.215-1.004.143zm-10.177 0c-.36 0-.717 0-1.004-.07-.645-.215-.932-.86-.86-1.434 0-.143.072-.645.502-.717.143 0 .5.07.788.645.143.43.358.93.574 1.576z",fill:"#8189A9",fillRule:"nonzero"}),a.createElement("path",{d:"M167.804 157.88c-.287 0-.502-.287-.574-.574v-8.457c0-.36.287-.575.574-.575.358 0 .573.287.573.574v8.456c0 .36-.287.574-.573.574zm-10.75 2.58l-4.302-7.31c-.143-.216-.072-.574.215-.717.215-.144.573-.072.717.215l4.3 7.31c.144.215.072.574-.215.717-.072.072-.216.072-.287.072-.144 0-.36-.144-.43-.287zm-14.55 3.44c-.217-.143-.288-.43-.145-.716.142-.287.43-.36.716-.215l7.382 4.156c.287.143.36.43.215.717-.143.215-.286.286-.5.286-.145 0-.216 0-.288-.072l-7.383-4.157zm-3.442 14.48c-.287 0-.573-.288-.573-.503-.073-.358.214-.573.5-.573l8.458-.072c.358 0 .573.215.573.502.073.358-.214.573-.5.573l-8.458.072zm10.966 9.03c.215-.143.574-.072.79.215.142.215.07.573-.216.717l-7.31 4.23c-.073.07-.216.07-.288.07-.215 0-.43-.143-.5-.286-.145-.215-.073-.574.214-.717l7.31-4.23zm12.472-29.458l-1.505-4.874c-.072-.287.07-.574.358-.645.287-.072.573.07.645.358l1.505 4.875c.072.287-.07.573-.358.645h-.143c-.215 0-.43-.143-.502-.358zm-9.103 5.303l-3.727-3.44c-.215-.215-.215-.573 0-.788.215-.215.573-.215.788 0l3.728 3.44c.215.215.215.573 0 .788-.144.072-.287.144-.43.144-.144 0-.287-.073-.36-.145zm-4.66 8.816c0 .217-.214.432-.5.432h-.144l-4.945-1.076c-.287-.07-.502-.358-.43-.645.07-.285.358-.5.645-.43l4.945 1.076c.287.072.502.36.43.646zm-5.733 11.47l4.874-1.577c.287-.072.574.07.645.358.072.288-.07.574-.358.646l-4.874 1.577h-.142c-.215 0-.43-.143-.502-.358-.072-.287.072-.574.358-.646zm9.748 7.884c.143-.215.502-.215.788 0 .287.215.287.573.072.788l-3.44 3.727c-.144.07-.287.143-.43.143-.144 0-.287-.072-.36-.144-.285-.216-.285-.574-.07-.79l3.44-3.726zm40.063-27.523l-7.382 4.158c-.072.07-.143.07-.287.07-.215 0-.358-.07-.502-.285-.143-.287-.07-.574.216-.717l7.382-4.157c.287-.145.573-.073.717.214.142.286.07.573-.145.717zm3.372 14.48l-8.458-.073c-.287 0-.574-.215-.502-.573 0-.287.215-.502.573-.502l8.46.072c.285 0 .572.215.5.573 0 .215-.286.502-.573.502zm-10.608 9.03l7.31 4.23c.287.142.358.5.215.716-.072.143-.287.286-.502.286-.07 0-.215 0-.286-.07l-7.31-4.23c-.288-.144-.36-.502-.216-.717.216-.287.574-.358.79-.215zm.86-15.34c-.072-.285.143-.572.43-.644l4.945-1.075c.287-.07.573.145.645.43.072.288-.143.575-.43.646l-4.946 1.076h-.143c-.286 0-.5-.215-.5-.43zm6.163 11.47c.287.07.43.358.36.645-.073.215-.288.358-.503.358h-.143l-4.874-1.577c-.287-.072-.43-.358-.36-.645.073-.286.36-.43.646-.357l4.873 1.577zm-9.46 7.884l3.44 3.727c.215.216.215.574-.072.79-.07.07-.214.143-.357.143-.144 0-.287-.072-.43-.144l-3.44-3.728c-.216-.215-.216-.573.07-.788.288-.215.646-.215.79 0zm-5.233-30.82c-.287-.144-.358-.43-.215-.717l4.3-7.31c.144-.288.43-.36.717-.216s.36.43.215.718l-4.3 7.31c-.072.215-.215.287-.43.287-.072 0-.215 0-.287-.072zm-5.447-2.294c-.287-.072-.43-.358-.36-.645l1.506-4.874c.07-.286.358-.43.645-.357.286.07.43.358.358.645l-1.505 4.874c-.072.215-.287.358-.502.358h-.143zm9.102 4.945c-.215-.215-.215-.573 0-.788l3.727-3.44c.216-.215.574-.215.79 0 .214.215.214.573 0 .788l-3.728 3.44c-.072.072-.215.144-.36.144-.142 0-.357 0-.43-.145z",fillOpacity:".5",fill:"#C770C8",fillRule:"nonzero"}),a.createElement("g",{fillRule:"nonzero"},a.createElement("path",{d:"M297.125 147.025c.3.3.3.8-.1 1.1-.1.1-.3.2-.5.2s-.4-.1-.5-.2l-1.8-1.8c-.3-.3-.3-.8 0-1.1.3-.3.8-.3 1.1 0l1.8 1.8zm3.9 4l1.7 1.8c.3.3.3.8 0 1.1-.1.1-.3.2-.5.2s-.4-.1-.5-.2l-1.8-1.8c-.3-.3-.3-.8 0-1.1.3-.3.8-.3 1.1 0zm-5 0c.3-.3.8-.3 1 0 .3.3.3.8 0 1.1l-1.8 1.8c-.1.1-.3.2-.5.2s-.4-.1-.5-.2c-.3-.3-.3-.8 0-1.1l1.8-1.8zm6.8-5.7c.3.3.3.8-.1 1.1l-1.8 1.8c-.1.1-.3.2-.5.2s-.4-.1-.5-.2c-.3-.3-.3-.8 0-1.1l1.8-1.8c.3-.3.8-.3 1.1 0zM121.425 366.225l1.7 1.8c.3.3.3.8 0 1.1-.1.1-.3.2-.5.2s-.4-.1-.5-.2l-1.8-1.8c-.3-.3-.3-.8 0-1.1.3-.3.8-.3 1.1 0zm5.6 5.7l1.7 1.8c.3.3.3.8 0 1.1-.1.1-.3.2-.5.2s-.4-.1-.5-.2l-1.8-1.8c-.3-.3-.3-.8 0-1.1.3-.3.8-.3 1.1 0zm-5 0c.3-.3.8-.3 1 0 .3.3.3.8 0 1.1l-1.8 1.8c-.1.1-.3.2-.5.2s-.4-.1-.5-.2c-.3-.3-.3-.8 0-1.1l1.8-1.8zm5.7-5.7c.3-.3.8-.3 1 0 .3.3.3.8 0 1.1l-1.8 1.8c-.1.1-.3.2-.5.2s-.4-.1-.5-.2c-.3-.3-.3-.8 0-1.1l1.8-1.8zM195.025 57.125l-1.8-1.8c-.3-.3-.3-.8 0-1.1.3-.3.8-.3 1.1 0l1.7 1.8c.3.3.3.8 0 1.1-.1.1-.3.2-.5.2s-.4-.1-.5-.2zm5.7 5.6l-1.9-1.8c-.3-.3-.3-.8 0-1.1.3-.3.8-.3 1.1 0l1.8 1.8c.3.3.3.8 0 1.1-.1.1-.3.2-.5.2s-.4-.1-.5-.2zm-6.9.2c-.2 0-.4 0-.5-.1-.3-.3-.3-.8 0-1.1l1.7-1.9c.3-.3.8-.3 1.1 0 .3.3.3.8 0 1.1l-1.8 1.8c-.1.1-.3.2-.5.2zm5.7-5.6c-.2 0-.4-.1-.6-.2-.3-.3-.3-.8 0-1.1l1.8-1.8c.3-.3.8-.3 1.1 0 .3.3.3.8 0 1.1l-1.8 1.8c-.1.1-.3.2-.5.2z",fill:"#F9E799"}),a.createElement("path",{d:"M62.8 135.5c.5 0 .8-.2.8-.7 0-.5-.4-.8-.8-.8H48.3c-.4 0-.9.2-.9.7 0 .5.4.8.8.8h14.6zm-19.3 0c.4 0 .8-.2.8-.7 0-.5-.4-.8-.8-.8h-4.7c-.4 0-.8.2-.8.7 0 .5.4.8.8.8h4.7zm-4.7 5H49c.5 0 .8-.3.8-.8s-.4-.8-.8-.8H38.8c-.5 0-.8.3-.8.8s.4.8.8.8zm14.5 0h3.3c.5 0 .8-.3.8-.8s-.4-.8-.8-.8h-3.3c-.5 0-.8.3-.8.8s.4.8.8.8zM311 12.3c0 .4-.3.7-.8.8h-14.6c-.5 0-.8-.3-.8-.8s.4-.8.8-.8h14.6c.5 0 .8.4.8.8zm4 .7c-.4 0-.8-.3-.8-.8s.4-.8.8-.8h4.7c.5 0 .8.3.8.8s-.4.8-.8.8H315zm4.7 3.5c.5 0 .8.4.8.8 0 .5-.4.8-.8.8h-10.1c-.5 0-.8-.4-.8-.8 0-.5.4-.8.8-.8h10.1zm-14.5 0c.5 0 .8.4.9.8 0 .5-.4.8-.8.8H302c-.5 0-.8-.4-.8-.8 0-.5.4-.8.8-.8h3.2z",fill:"#A4D3FF"}),a.createElement("path",{d:"M0 3.9c0 2.2 1.8 3.9 3.9 3.9 2.2 0 3.9-1.8 3.9-3.9C7.8 1.7 6 0 3.9 0 1.7 0 0 1.7 0 3.9zm6.3 0c0 1.3-1.1 2.4-2.4 2.4-1.3 0-2.4-1.1-2.4-2.4 0-1.3 1.1-2.4 2.4-2.4 1.3 0 2.4 1 2.4 2.4zM330.4 301c-1.9 0-3.4 1.5-3.4 3.4s1.5 3.4 3.4 3.4 3.4-1.5 3.4-3.4c-.1-1.9-1.6-3.4-3.4-3.4zm0 5.2c-1 0-1.9-.8-1.9-1.9 0-1 .8-1.9 1.9-1.9 1 0 1.9.8 1.9 1.9-.1 1.1-.9 1.9-1.9 1.9zM113.6 101.2c2.2 0 3.9-1.8 3.9-3.9 0-2.2-1.8-3.9-3.9-3.9-2.2 0-3.9 1.8-3.9 3.9 0 2.1 1.7 3.9 3.9 3.9zm0-6.3c1.3 0 2.4 1.1 2.4 2.4 0 1.3-1.1 2.4-2.4 2.4-1.3 0-2.4-1.1-2.4-2.4 0-1.4 1.1-2.4 2.4-2.4z",fill:"#A1E7D7"}))))}},2043:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(14),s=n(122),l=n(1463),c=n(1464),u=n(1461),d=n(1467),p=n(1643),f=n(2041),h=n(573),m=n(1488),g=n(3),v=n(0),_=n(1480),b=n(1505),y=n(1504),w=n(2042),E=n(1546),k=n(1901),x=n(1529),S=n(1465),C=S.Card.createFromAlert(new l.AlertImpl(l.Alert.generate(1),l.InternalAlertOps.mock,_.RangeManager.mock));t.PlagiarismView=function(e){var t;return i.createElement("div",{key:c.Lens.SpecialId.Plagiarism,className:x.lensWrapper},i.createElement(o.F.div,r.__assign({},o.classes(e.transition.map(function(e){return e.base}),x.headerWrapper)),i.createElement(E.SidebarHeader,{title:"Plagiarism",theme:{title:e.transition.map(function(e){return e.title}),wrapper:x.header}},e.plagiarismViewModel.plagiarismViewState.view(function(t){return t.type===y.PlagiarismViewType.cards?[i.createElement(d.Small,{className:x.lensCounter,key:"count"},e.plagiarismViewModel.checkingState.map(function(e){return e.sources>0?e.sources:""})),i.createElement(u.Button.Round,{key:"dismiss-all",name:"dismiss-all",title:"Dismiss all",className:x.headerBtn,onClick:function(){t.currentLens.dismissAll()}},i.createElement(h.Icon.Ignore,null))]:[]}))),i.createElement("div",{className:x.viewport,ref:function(e){return e&&(t=e)}},i.createElement(o.F.div,r.__assign({},o.classes(x.lensviewContentWrapper,e.transition.map(function(e){return e.base}))),i.createElement(o.F.div,r.__assign({},o.classes(x.scrollWrapper,e.transition.map(function(e){return e.content}))),e.plagiarismViewModel.plagiarismViewState.view(function(n){switch(n.type){case y.PlagiarismViewType.originality100:return i.createElement(w.Originality100,{key:"originality100"});case y.PlagiarismViewType.loading:return i.createElement(w.Loading,{key:"loading"});case y.PlagiarismViewType.cards:return i.createElement(O,r.__assign({key:"cards-view"},e,{viewportEl:t,lens:n.currentLens}));default:return g.assertNever(n)}})))))};var M={MLA:"https://owl.english.purdue.edu/owl/resource/747/08/",APA:"https://owl.english.purdue.edu/owl/resource/560/10/",Chicago:"https://owl.english.purdue.edu/owl/resource/717/05/"},A=function(e){var t=e.type;return i.createElement("a",{target:"_blank",href:M[t],className:k.referenceLink},t)},O=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._viewportEl=t.props.viewportEl,t._lensedVM=t.props.scrollVM.view(t.props.lens),t._subs=[],t._activeEl=o.Atom.create(a.None),t._regularEl=o.Atom.create(a.None),t._setActive=function(e,n){return t._activeEl.set(a.Some({el:e,id:n}))},t._setRegular=function(e){return t._regularEl.set(a.Some(e))},t._titleState=v.Observable.combineLatest(t.props.plagiarismViewModel.checkingState.switchMap(function(e){return e.percent},function(e,t){return{percent:t,count:e.sources}}),t._lensedVM.viewState.map(function(e){return e.cards.length})).map(function(e){var t=e[0];return{percent:t.percent,count:t.count,length:e[1]}}).startWith({percent:0,count:0,length:0}),t}return r.__extends(t,e),t.prototype.componentDidMount=function(){this.props.isMaster&&this._setMaster()},t.prototype.componentDidUpdate=function(){this.props.isMaster?this._setMaster():this._clearSubs()},t.prototype.componentWillUnmount=function(){this._clearSubs()},t.prototype.render=function(){var e=this,t=this.props,n=t.pageViewModel,a=t.cardsVM,s=t.marksVM,l=t.plagiarismViewModel;return i.createElement(p.Scroller,{className:x.scroll,lensedVM:this._lensedVM,setActive:this._setActive,setRegular:this._setRegular,onMount:function(t){return t&&(e._scrollEl=t)},onTitleMount:function(t){return t&&(e._titleEl=t)},renderFake:function(){return i.createElement(m.BaseCard.Wrapper,{key:"fakeCard"},i.createElement(b.Mini,{card:C,context:a.getContext(C.activeAlert),marksVM:s,pageViewModel:n}))},renderCard:function(e){return i.createElement(f.PlagiarismCard,r.__assign({key:e.cardId},{card:e,plagiarismViewModel:l},{marksVM:s,cardsVM:a,pageViewModel:n}))}},i.createElement(o.F.div,null,this._titleState.map(function(t){var n=t.percent,r=t.count,o=t.length;return i.createElement(d.P2,{className:k.info},e.context.textResources.denali.plagiarism.lensDescription(n,r,o,A))})))},t.prototype._setMaster=function(){this._setSubs(),this._scrollEl&&(this._scrollEl.scrollTop=0,this._lensedVM.baseElements.scroll.set(a.Some(this._scrollEl))),this._viewportEl&&this._lensedVM.baseElements.viewport.set(a.Some(this._viewportEl)),this._titleEl&&this._lensedVM.baseElements.title.set(a.Some(this._titleEl))},t.prototype._setSubs=function(){var e=this;this._clearSubs(),this._subs.push(this._activeEl.subscribe(function(t){return t.map(function(t){var n=t.el,r=t.id;return e.props.scrollVM.updateBasic(n,{type:"active",id:r})})}),this._regularEl.subscribe(function(t){return t.map(function(t){return e.props.scrollVM.updateBasic(t,{type:"regular"})})}),this._titleState.subscribe(function(){e._titleEl&&e._lensedVM.baseElements.title.set(a.Some(e._titleEl))}))},t.prototype._clearSubs=function(){this._subs.forEach(function(e){return e.unsubscribe()}),this._subs=[]},t}(s.BaseComponent);t.PlagiarismCards=O},2044:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(23),a=n(7),s=n(122),l=n(1465),c=n(1564),u=n(1461),d=n(573),p=n(1807),f=n(1467),h=n(3),m=n(1902),g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onDoneEditing=function(e){var n=t.context,r=n.gnarSpec,i=n.pageId;r.doneEditingButtonClick(i,e),t.props.pageViewModel.closeSidebar()},t._onHideAssistant=function(e){var n=t.context,r=n.gnarSpec,i=n.pageId;r.assistantCloseButtonClick(i,e.currentLens.type),t.props.pageViewModel.closeSidebar()},t}return r.__extends(t,e),t.prototype._renderDoneEditing=function(){var e=this,t=this.props.pageViewModel.sidebarOpened;return i.createElement(a.F.div,r.__assign({},a.classes(m.doneEditingWrapper,this.props.className,t.view(function(e){return e?m.doneEditingVisible:m.doneEditingHidden}))),this.props.pageViewModel.state.view(function(t){switch(t.currentLens.type){case l.LensViewType.closed:case l.LensViewType.success:return null;case l.LensViewType.lensview:case l.LensViewType.advanced:case l.LensViewType.proofit:case l.LensViewType.plagiarism:var n=t.currentLens.type;return i.createElement(u.Button.Caps,{name:"done-editing",key:"close-sidebar",onClick:function(){return e._onDoneEditing(n)}},"Done editing");default:return h.assertNever(t.currentLens)}}))},t.prototype._renderHideAssistant=function(){var e=this;return i.createElement(a.F.div,r.__assign({},a.classes(this.props.className,this.props.pageViewModel.sidebarOpened.view(h.choose(m.hideAssistantVisible,m.hideAssistantHidden)))),i.createElement(u.Button.Caps,{name:"hide-assistant",title:this.context.textResources.denali.hideAssistant,className:m.hideAssistantBtn,onClick:function(){return e._onHideAssistant(e.props.pageViewModel.state.get())}},i.createElement(d.Icon.Exit,{className:m.exitIcon})))},t.prototype.render=function(){return this.props.features.denali.halfSidebar?this._renderDoneEditing():this._renderHideAssistant()},t}(s.BaseComponent);t.LensToggler=g;var v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.render=function(){return i.createElement(u.Button,{name:"to-overview",key:"overview",className:m.overviewBtn,disabled:!0,title:this.props.title},this.props.children)},t}(i.Component),_=s.withContext(function(e,t){var n=e.successLensViewModel,r=e.pageViewModel,s=e.documentModel,l=o.Observable.combineLatest(r.sidebarOpened,s.score,s.checkingState,s.counters,n.textAmount);return i.createElement(a.F.div,null,l.map(function(e){var n=e[0],r=e[1],o=e[2],a=e[3],s=e[4];return n?"idle"!==o?i.createElement(v,null,i.createElement("span",{className:m.checking},"Checking...")):a.critical+a.advanced||s===c.SuccessLensViewModel.TextAmount.zero?r.fold(function(){return i.createElement(v,null,i.createElement("span",{className:m.scoreWrapper},i.createElement(f.H1,{className:m.zeroScore,"data-disabled":!0})))},function(e){return i.createElement(v,{title:t.textResources.denali.rankTooltip(e.rank)},i.createElement("span",{className:m.scoreWrapper},i.createElement(f.H1,{className:m.score,"data-disabled":!0},e.rank),i.createElement(f.H3,null,t.textResources.denali.rank)))}):i.createElement(v,{title:t.textResources.denali.noIssuesFound},i.createElement(d.Icon.Checkmark,{width:28})):null}))}),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.successLensViewModel,n=e.pageViewModel,r=e.documentModel,o=e.sidebarViewModel,s=e.features;return i.createElement(a.F.div,{className:m.sidebarHeader},i.createElement("div",{className:m.togglerWrapper},i.createElement(p.NewToggler,{pageViewModel:n,documentModel:r,sidebarViewModel:o,features:s})),i.createElement(_,{successLensViewModel:t,pageViewModel:n,documentModel:r}),i.createElement(g,{key:"lensToggler",pageViewModel:n,features:s,className:m.lensToggler}))},t}(s.BaseComponent);t.SidebarHeader=b},2047:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(122),s=n(1813),l=n(1706),c=n(1688),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.render=function(){return i.createElement(o.F.div,r.__assign({onTransitionEnd:this.props.onTransitionEnd},o.classes(c.successLens,this.props.transition.map(function(e){return e.base}))),i.createElement(s.SuccessContainer,{state:this.props.successLensViewModel.successState,preventAnimation:this.props.features.preventAnimation}))},t}(a.BaseComponent);t.SuccessLensView=u,function(e){e.Preload=l.IllustrationPreload}(u=t.SuccessLensView||(t.SuccessLensView={})),t.SuccessLensView=u},2049:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(576),a=n(7),s=n(1791),l=n(573),c=n(3),u=n(23),d=n(585),p=n(2050),f=n(2051),h=n(1739),m=n(6),g=n(14),v=70,_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onClickSubscription=null,t}return r.__extends(t,e),t.prototype.componentDidMount=function(){var e=this,t=o.findDOMNode(this);this._onClickSubscription=u.Observable.fromEvent(window,"click").subscribe(function(n){t!==n.target&&!d.isParent(t,n.target)&&e.props.shouldHide(n.target)&&e.props.hide()})},t.prototype.componentWillUnmount=function(){null!==this._onClickSubscription&&this._onClickSubscription.unsubscribe()},t.prototype.render=function(){return i.Children.only(this.props.children)},t}(i.Component),b=32,y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._getRect=function(){return t.props.synonymsInfo.activeMark.rect[1]},t._getAbsRect=function(){return t.props.synonymsInfo.activeMark.viewportRect[1]},t._state=a.Atom.create({position:{top:t._getRect().bottom,left:0}}),t._updatePosition=function(e){if(t._el){var n=t.props,r=n.synonyms,i=n.synonymsInfo,o=t._el.getBoundingClientRect(),a=o.width,s=o.bottom,l=t._getAbsRect(),c=t._getRect(),u=l.left+a,d=u<e.right?0:u-e.right+b;t._state.set({position:{top:c.top+c.height,left:c.left-d}});var p=e.bottom-s;p<v&&r.ded.scrollToMark(i.activeMark,{paddingTop:l.bottom+p-e.top-v})}},t._sub=null,t}return r.__extends(t,e),t.prototype.componentDidMount=function(){this._sub=this.props.viewport.subscribe(this._updatePosition)},t.prototype.componentWillUnmount=function(){this._sub&&(this._sub.unsubscribe(),this._sub=null)},t.prototype.render=function(){var e=this,t=this.props,n=t.synonyms,r=t.synonymsInfo;return i.createElement(a.F.div,{mount:function(t){return e._el=t},key:"synonymsPopupWrapper",style:this._state.view("position"),className:h.synonymsPopupWrapper},i.createElement(_,{hide:function(){return n.hidePopup()},shouldHide:n.shouldHide},s.SynonymsModel.isEmpty(r.synonymsState)?i.createElement(f.SynonymsEmpty,{activeWord:r.activeWord.value}):i.createElement(p.SynonymsCard,{key:"synonymsCard",apply:function(e){return function(){return n.apply(e)}},result:r.synonymsState.synonyms})))},t}(i.Component),w=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._log=m.Monitoring.Logging.getLogger("SynonymIconWrapper"),t}return r.__extends(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.viewport,r=t.mark,o=t.className,s=t.children;return i.createElement(a.F.div,{className:o,style:n.view(function(){return e._log.debug("Update tooltip position"),g.Try.of(function(){return r.rect[1]})}).view(function(e){return e.map(function(e){return c.ReactUtils.translate(e.left+e.width,e.top)}).getOrElse({visibility:"hidden"})})},s)},t}(i.Component),E=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._log=m.Monitoring.Logging.getLogger("SynonymsView"),t}return r.__extends(t,e),t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.renderLoader=function(e,t){return u.Observable.of(i.createElement(w,{className:h.iconWrapper,viewport:t,mark:e.activeMark},i.createElement(l.Icon.SynonymLoader,{className:h.loader}))).delay(1e3).startWith(null)},t.prototype.renderPopup=function(e,t){return u.Observable.of(i.createElement(y,{synonyms:this.props.synonyms,synonymsInfo:e,viewport:t}))},t.prototype.render=function(){var e=this,t=this.props,n=t.synonyms,r=t.viewport,o=n.viewState.view(function(e){return e.map(function(e){return e.popupVisible}).getOrElse(!1)});return i.createElement(a.F.div,{className:h.contentWrapper},n.viewState.do(function(t){return e._log.debug("Synonym state changed",t.fold(function(){return null},function(e){return{kind:e.synonymsState.kind,popupVisible:e.popupVisible}}))}).switchMap(function(t){return t.map(function(t){return s.SynonymsModel.isQuerying(t.synonymsState)?e.renderLoader(t,r):o.switchMap(function(n){return n?e.renderPopup(t,r):u.Observable.of(null)})}).getOrElse(u.Observable.of(null))}))},t}(i.Component);t.SynonymsView=E},2050:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(1461),a=n(1467),s=n(7),l=n(1739),c=function(e){var t=e.word,n=e.apply;return i.createElement(o.Button.Blue,{name:"accept-synonym",className:l.item,onClick:n(t)},t)},u=function(e){var t=e.synonyms,n=e.apply;return i.createElement("div",{className:l.row},t.map(function(e,t){return i.createElement(c,r.__assign({},{word:e,key:t,apply:n}))}))};t.SynonymsCard=function(e){var t=e.result.synonymsOrGroups,n=e.apply;return i.createElement(s.F.div,{className:l.wrapper},i.createElement(a.P2,{className:l.title},"Synonyms"),t.fold(function(e){return i.createElement(u,r.__assign({key:"single"},{synonyms:e,apply:n}))},function(e){return i.createElement("ol",{className:l.list},e.map(function(e,t){var o=e.meaning,s=e.words;return i.createElement("li",{key:t,className:l.group},i.createElement(a.P2,{className:l.groupTitle},o),i.createElement(u,r.__assign({key:"single"},{synonyms:s,apply:n})))}))}))}},2051:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(13),i=n(1739);t.SynonymsEmpty=function(e){var t=e.activeWord;return r.createElement("div",{className:i.emptyResultWrapper},"No synonyms for ",r.createElement("span",{className:i.activeWord},t)," found")}},2052:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(7),a=n(1485),s=n(1467),l=n(1461),c=n(573),u=n(1483),d=n(1815),p=n(1905);t.ToolbarBase=function(e){var t=e.title,n=e.toHome,a=e.children,l=e.titleClassName;return i.createElement("div",{className:p.wrapper,"data-name":"document-tools"},n,i.createElement(s.H3,r.__assign({key:"title"},o.classes(p.title,l),{"data-name":"toolbar-title"}),t),a)},t.Toolbar=function(e){return i.createElement(t.ToolbarBase,{title:e.documentModel.title.view(function(e){return e||"Untitled"}),toHome:i.createElement(d.ToHome,r.__assign({},e,{discoverabilityOnExitThemes:{className:p.discoverabilityOnExit,triangleClassName:p.discoverabilityOnExitTriangle}}))},i.createElement(a.Onboarding,{key:"actions-onboarding-document-menu",alignment:"bottomRight",eventType:"onhover",stepId:"step6",title:"Document Menu",message:"Hover your mouse over the arrow to open the document menu.",themes:{spotClassName:p.onboardingSpot,notificationClassName:p.onboardingSpot}},i.createElement(u.Dropdown,{showDelay:0,name:"horizontal-toolbar",label:i.createElement(l.Button.Round,{name:"document-actions"},i.createElement(c.Icon.More,null)),align:"left",theme:p},i.createElement(d.OutActions,{documentModel:e.documentModel}),i.createElement(u.Dropdown.Delimiter,null),i.createElement(d.InActions,{uploadViewModel:e.uploadViewModel}))),i.createElement(d.Saved,{classes:{saved:p.saved,notSaved:p.notSaved},documentModel:e.documentModel}))}},2053:function(e,t,n){"use strict";function r(e){return e.denali.horizontalToolbar?c:l}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(13),a=n(7),s=n(122),l=n(2054),c=n(2052),u=n(1815),d=n(311),p=n(1906);t.FakeToolbar=s.withContext(function(e,t){var n=e.features,r=e.type,i=t.textResources;return o.createElement(c.ToolbarBase,{title:a.Atom.create(r===d.DocumentLoader.TextType.loading?i.denali.toolbar.loading:i.denali.toolbar.processing),titleClassName:n.denali.horizontalToolbar?p.darkTitle:p.lightTitle,toHome:o.createElement(u.ToHomeBase,null)})}),t.Toolbar=function(e){var t=r(e.featuresModel).Toolbar;return o.createElement(t,i.__assign({},e))}},2054:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(13),o=n(6),a=n(1461),s=n(573),l=n(1483),c=n(1815),u=n(1907),d=function(e,t){e&&o.Monitoring.Logging.getLogger("verticalToolbarView").info("Dropdown hovered: "+t)},p=function(e){var t=e.status,n=e.toHome,r=e.children;return i.createElement("div",{className:u.wrapper,"data-name":"document-tools"},i.createElement("div",{className:u.buttons},n,i.createElement("div",{"data-name":"document-actions"},r)),t)};t.Toolbar=function(e){return i.createElement(p,{toHome:i.createElement(c.ToHome,r.__assign({},e,{discoverabilityOnExitThemes:{className:u.discoverabilityOnExit,triangleClassName:u.discoverabilityOnExitTriangle}})),status:i.createElement(c.Saved,{documentModel:e.documentModel,classes:{saved:u.saved,notSaved:u.notSaved}})},i.createElement(l.Dropdown,{theme:u,showDelay:0,name:"vertical-toolbar-in",label:i.createElement(a.Button.Round,{name:"document-in-actions",className:u.toolbarBtn},i.createElement(s.Icon.ToolbarCreate,null)),onVisibilityChange:function(e){return d(e,"document-in-actions")}},i.createElement(c.InActions,{uploadViewModel:e.uploadViewModel})),i.createElement(l.Dropdown,{theme:u,showDelay:0,name:"vertical-toolbar-out",label:i.createElement(a.Button.Round,{name:"document-out-actions",className:u.toolbarBtn},i.createElement(s.Icon.Download,null)),onVisibilityChange:function(e){return d(e,"document-out-actions")}},i.createElement(c.OutActions,{documentModel:e.documentModel})))}}});