(window.webpackJsonp = window.webpackJsonp || []).push([[2], { "+VCQ": function(e, t, n) { "use strict"; n.d(t, "a", (function() { return s } )), n.d(t, "b", (function() { return u } )); var l = n("Mlb/") , i = n("olnp") , a = (n("5WpM"), n("REFQ"), n("vk2e")) , o = n("ApBt") , r = n("P6pJ") , s = l["\u0275crt"]({ encapsulation: 2, styles: [".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:none;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:transparent}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}.cdk-high-contrast-active .mat-option{margin:0 1px}.cdk-high-contrast-active .mat-option.mat-active{border:solid 1px currentColor;margin:0}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option .mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.cdk-high-contrast-active .mat-option .mat-option-ripple{opacity:.5}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}\n"], data: {} }); function d(e) { return l["\u0275vid"](0, [(e()(), l["\u0275eld"](0, 0, null, null, 1, "mat-pseudo-checkbox", [["class", "mat-option-pseudo-checkbox mat-pseudo-checkbox"]], [[2, "mat-pseudo-checkbox-indeterminate", null], [2, "mat-pseudo-checkbox-checked", null], [2, "mat-pseudo-checkbox-disabled", null], [2, "_mat-animation-noopable", null]], null, null, p, c)), l["\u0275did"](1, 49152, null, 0, i.t, [[2, r.a]], { state: [0, "state"], disabled: [1, "disabled"] }, null)], (function(e, t) { var n = t.component; e(t, 1, 0, n.selected ? "checked" : "unchecked", n.disabled) } ), (function(e, t) { e(t, 0, 0, "indeterminate" === l["\u0275nov"](t, 1).state, "checked" === l["\u0275nov"](t, 1).state, l["\u0275nov"](t, 1).disabled, "NoopAnimations" === l["\u0275nov"](t, 1)._animationMode) } )) } function u(e) { return l["\u0275vid"](2, [(e()(), l["\u0275and"](16777216, null, null, 1, null, d)), l["\u0275did"](1, 16384, null, 0, a.l, [l.ViewContainerRef, l.TemplateRef], { ngIf: [0, "ngIf"] }, null), (e()(), l["\u0275eld"](2, 0, null, null, 1, "span", [["class", "mat-option-text"]], null, null, null, null, null)), l["\u0275ncd"](null, 0), (e()(), l["\u0275eld"](4, 0, null, null, 1, "div", [["class", "mat-option-ripple mat-ripple"], ["mat-ripple", ""]], [[2, "mat-ripple-unbounded", null]], null, null, null, null)), l["\u0275did"](5, 212992, null, 0, i.v, [l.ElementRef, l.NgZone, o.a, [2, i.k], [2, r.a]], { disabled: [0, "disabled"], trigger: [1, "trigger"] }, null)], (function(e, t) { var n = t.component; e(t, 1, 0, n.multiple), e(t, 5, 0, n.disabled || n.disableRipple, n._getHostElement()) } ), (function(e, t) { e(t, 4, 0, l["\u0275nov"](t, 5).unbounded) } )) } var c = l["\u0275crt"]({ encapsulation: 2, styles: ['.mat-pseudo-checkbox{width:16px;height:16px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:transparent}._mat-animation-noopable.mat-pseudo-checkbox{transition:none;animation:none}._mat-animation-noopable.mat-pseudo-checkbox::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:5px;left:1px;width:10px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{top:2.4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}\n'], data: {} }); function p(e) { return l["\u0275vid"](2, [], null, null) } }, "0ScC": function(e, t, n) { "use strict"; n.d(t, "a", (function() { return o } )), n.d(t, "b", (function() { return r } )); var l = n("Mlb/") , i = n("wqdy") , a = n("C0xW") , o = (n("ovWl"), l["\u0275crt"]({ encapsulation: 2, styles: [], data: {} })); function r(e) { return l["\u0275vid"](2, [l["\u0275pid"](0, i.a, [a.b]), (e()(), l["\u0275eld"](1, 0, null, null, 1, "div", [["class", "cb-survey-header"]], [[8, "innerHTML", 1]], null, null, null, null)), l["\u0275ppd"](2, 1)], null, (function(e, t) { var n = t.component , i = n.styleTemplate && n.styleTemplate.header ? l["\u0275unv"](t, 1, 0, e(t, 2, 0, l["\u0275nov"](t, 0), n.styleTemplate.header)) : ""; e(t, 1, 0, i) } )) } }, D83Z: function(e, t, n) { "use strict"; n.d(t, "a", (function() { return i } )), n.d(t, "b", (function() { return a } )); var l = n("Mlb/") , i = (n("zijP"), n("5WpM"), n("olnp"), n("REFQ"), n("vk2e"), l["\u0275crt"]({ encapsulation: 2, styles: [".mat-icon{background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}\n"], data: {} })); function a(e) { return l["\u0275vid"](2, [l["\u0275ncd"](null, 0)], null, null) } }, DtsY: function(e, t, n) { "use strict"; n.d(t, "a", (function() { return r } )), n.d(t, "b", (function() { return m } )); var l = n("Mlb/") , i = (n("UvOV"), n("vk2e")) , a = n("D9PZ") , o = n("5WpM") , r = (n("yMgA"), n("rhUx"), n("ApBt"), n("mOWz"), n("olnp"), n("REFQ"), n("Dfgh"), n("QZuW"), l["\u0275crt"]({ encapsulation: 2, styles: [".mat-select{display:inline-block;width:100%;outline:none}.mat-select-trigger{display:inline-table;cursor:pointer;position:relative;box-sizing:border-box}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-select-value{display:table-cell;max-width:0;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{display:table-cell;vertical-align:middle}.mat-form-field-appearance-fill .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:translateY(-25%)}.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:none}.mat-select-arrow{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;margin:0 4px}.mat-select-panel-wrap{flex-basis:100%}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%;border-radius:4px}.cdk-high-contrast-active .mat-select-panel{outline:solid 1px}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable .mat-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-select-placeholder{color:transparent;-webkit-text-fill-color:transparent;transition:none;display:block}\n"], data: { animation: [{ type: 7, name: "transformPanelWrap", definitions: [{ type: 1, expr: "* => void", animation: { type: 11, selector: "@transformPanel", animation: [{ type: 9, options: null }], options: { optional: !0 } }, options: null }], options: {} }, { type: 7, name: "transformPanel", definitions: [{ type: 0, name: "void", styles: { type: 6, styles: { transform: "scaleY(0.8)", minWidth: "100%", opacity: 0 }, offset: null }, options: void 0 }, { type: 0, name: "showing", styles: { type: 6, styles: { opacity: 1, minWidth: "calc(100% + 32px)", transform: "scaleY(1)" }, offset: null }, options: void 0 }, { type: 0, name: "showing-multiple", styles: { type: 6, styles: { opacity: 1, minWidth: "calc(100% + 64px)", transform: "scaleY(1)" }, offset: null }, options: void 0 }, { type: 1, expr: "void => *", animation: { type: 4, styles: null, timings: "120ms cubic-bezier(0, 0, 0.2, 1)" }, options: null }, { type: 1, expr: "* => void", animation: { type: 4, styles: { type: 6, styles: { opacity: 0 }, offset: null }, timings: "100ms 25ms linear" }, options: null }], options: {} }] } })); function s(e) { return l["\u0275vid"](0, [(e()(), l["\u0275eld"](0, 0, null, null, 1, "span", [["class", "mat-select-placeholder"]], null, null, null, null, null)), (e()(), l["\u0275ted"](1, null, ["", ""]))], null, (function(e, t) { e(t, 1, 0, t.component.placeholder || "\xa0") } )) } function d(e) { return l["\u0275vid"](0, [(e()(), l["\u0275eld"](0, 0, null, null, 1, "span", [], null, null, null, null, null)), (e()(), l["\u0275ted"](1, null, ["", ""]))], null, (function(e, t) { e(t, 1, 0, t.component.triggerValue || "\xa0") } )) } function u(e) { return l["\u0275vid"](0, [l["\u0275ncd"](null, 0), (e()(), l["\u0275and"](0, null, null, 0))], null, null) } function c(e) { return l["\u0275vid"](0, [(e()(), l["\u0275eld"](0, 0, null, null, 5, "span", [["class", "mat-select-value-text"]], null, null, null, null, null)), l["\u0275did"](1, 16384, null, 0, i.p, [], { ngSwitch: [0, "ngSwitch"] }, null), (e()(), l["\u0275and"](16777216, null, null, 1, null, d)), l["\u0275did"](3, 16384, null, 0, i.r, [l.ViewContainerRef, l.TemplateRef, i.p], null, null), (e()(), l["\u0275and"](16777216, null, null, 1, null, u)), l["\u0275did"](5, 278528, null, 0, i.q, [l.ViewContainerRef, l.TemplateRef, i.p], { ngSwitchCase: [0, "ngSwitchCase"] }, null)], (function(e, t) { e(t, 1, 0, !!t.component.customTrigger), e(t, 5, 0, !0) } ), null) } function p(e) { return l["\u0275vid"](0, [(e()(), l["\u0275eld"](0, 0, null, null, 3, "div", [["class", "mat-select-panel-wrap"]], [[24, "@transformPanelWrap", 0]], null, null, null, null)), (e()(), l["\u0275eld"](1, 0, [[2, 0], ["panel", 1]], null, 2, "div", [], [[1, "id", 0], [24, "@transformPanel", 0], [4, "transformOrigin", null], [4, "font-size", "px"]], [[null, "@transformPanel.done"], [null, "keydown"]], (function(e, t, n) { var l = !0 , i = e.component; return "@transformPanel.done" === t && (l = !1 !== i._panelDoneAnimatingStream.next(n.toState) && l), "keydown" === t && (l = !1 !== i._handleKeydown(n) && l), l } ), null, null)), l["\u0275did"](2, 278528, null, 0, i.j, [l.IterableDiffers, l.KeyValueDiffers, l.ElementRef, l.Renderer2], { klass: [0, "klass"], ngClass: [1, "ngClass"] }, null), l["\u0275ncd"](null, 1)], (function(e, t) { var n = t.component; e(t, 2, 0, l["\u0275inlineInterpolate"](1, "mat-select-panel ", n._getPanelTheme(), ""), n.panelClass) } ), (function(e, t) { var n = t.component; e(t, 0, 0, void 0), e(t, 1, 0, n.id + "-panel", n.multiple ? "showing-multiple" : "showing", n._transformOrigin, n._triggerFontSize) } )) } function m(e) { return l["\u0275vid"](2, [l["\u0275qud"](671088640, 1, { trigger: 0 }), l["\u0275qud"](671088640, 2, { panel: 0 }), l["\u0275qud"](671088640, 3, { overlayDir: 0 }), (e()(), l["\u0275eld"](3, 0, [[1, 0], ["trigger", 1]], null, 9, "div", [["aria-hidden", "true"], ["cdk-overlay-origin", ""], ["class", "mat-select-trigger"]], null, [[null, "click"]], (function(e, t, n) { var l = !0; return "click" === t && (l = !1 !== e.component.toggle() && l), l } ), null, null)), l["\u0275did"](4, 16384, [["origin", 4]], 0, a.b, [l.ElementRef], null, null), (e()(), l["\u0275eld"](5, 0, null, null, 5, "div", [["class", "mat-select-value"]], null, null, null, null, null)), l["\u0275did"](6, 16384, null, 0, i.p, [], { ngSwitch: [0, "ngSwitch"] }, null), (e()(), l["\u0275and"](16777216, null, null, 1, null, s)), l["\u0275did"](8, 278528, null, 0, i.q, [l.ViewContainerRef, l.TemplateRef, i.p], { ngSwitchCase: [0, "ngSwitchCase"] }, null), (e()(), l["\u0275and"](16777216, null, null, 1, null, c)), l["\u0275did"](10, 278528, null, 0, i.q, [l.ViewContainerRef, l.TemplateRef, i.p], { ngSwitchCase: [0, "ngSwitchCase"] }, null), (e()(), l["\u0275eld"](11, 0, null, null, 1, "div", [["class", "mat-select-arrow-wrapper"]], null, null, null, null, null)), (e()(), l["\u0275eld"](12, 0, null, null, 0, "div", [["class", "mat-select-arrow"]], null, null, null, null, null)), (e()(), l["\u0275and"](16777216, null, null, 1, (function(e, t, n) { var l = !0 , i = e.component; return "backdropClick" === t && (l = !1 !== i.close() && l), "attach" === t && (l = !1 !== i._onAttached() && l), "detach" === t && (l = !1 !== i.close() && l), l } ), p)), l["\u0275did"](14, 671744, [[3, 4]], 0, a.a, [a.d, l.TemplateRef, l.ViewContainerRef, a.k, [2, o.b]], { origin: [0, "origin"], positions: [1, "positions"], offsetY: [2, "offsetY"], minWidth: [3, "minWidth"], backdropClass: [4, "backdropClass"], scrollStrategy: [5, "scrollStrategy"], open: [6, "open"], hasBackdrop: [7, "hasBackdrop"], lockPosition: [8, "lockPosition"] }, { backdropClick: "backdropClick", attach: "attach", detach: "detach" })], (function(e, t) { var n = t.component; e(t, 6, 0, n.empty), e(t, 8, 0, !0), e(t, 10, 0, !1), e(t, 14, 0, l["\u0275nov"](t, 4), n._positions, n._offsetY, null == n._triggerRect ? null : n._triggerRect.width, "cdk-overlay-transparent-backdrop", n._scrollStrategy, n.panelOpen, "", "") } ), null) } }, Z4LR: function(e, t, n) { "use strict"; n.d(t, "a", (function() { return i } )); var l = n("9va6"); function i(e) { const t = window.__env && window.__env.virtualDirectory || "" , n = location.href.split("/") , i = `${n[0]}//${n[2]}`; return "/" !== l.last(t) ? `${i}${t}/${e}` : `${i}${t}${e}` } }, kU9X: function(e, t, n) { "use strict"; n.d(t, "a", (function() { return l } )); class l { } }, ket5: function(e, t, n) { "use strict"; n.d(t, "a", (function() { return d } )); var l = n("Mlb/") , i = n("9va6") , a = n("PIN6") , o = n("qIlG"); n("gL9d"), n("ZnKF"); const r = [{ name: "Andale Mono", fontFamily: "andale mono,times" }, { name: "Arial", fontFamily: "arial,helvetica,sans-serif" }, { name: "Arial Black", fontFamily: "arial black,avant garde" }, { name: "Book Antiqua", fontFamily: "book antiqua,palatino" }, { name: "Calibri", fontFamily: "Calibri" }, { name: "Comic Sans MS", fontFamily: "comic sans ms,sans-serif" }, { name: "Courier New", fontFamily: "courier new,courier" }, { name: "Dosis", fontFamily: "Dosis" }, { name: "Georgia", fontFamily: "georgia,palatino" }, { name: "Helvetica", fontFamily: "helvetica" }, { name: "HelveticaNeue", fontFamily: "HelveticaNeue" }, { name: "Impact", fontFamily: "impact,chicago" }, { name: "Lato", fontFamily: "Lato" }, { name: "MS Sans Serif", fontFamily: "MS Sans Serif" }, { name: "Merriweather Sans", fontFamily: "Merriweather Sans" }, { name: "Raleway", fontFamily: "Raleway" }, { name: "Rubik", fontFamily: "Rubik" }, { name: "Symbol", fontFamily: "symbol" }, { name: "Tahoma", fontFamily: "tahoma,arial,helvetica,sans-serif" }, { name: "Terminal", fontFamily: "terminal,monaco" }, { name: "Times New Roman", fontFamily: "times new roman,times" }, { name: "Trebuchet MS", fontFamily: "trebuchet ms,geneva" }, { name: "Verdana", fontFamily: "verdana,geneva" }, { name: "Webdings", fontFamily: "webdings" }, { name: "Wingdings", fontFamily: "wingdings,zapf dingbats" }]; var s = n("1uMA"); class d { constructor(e, t) { this.toasterService = e, this.contentFileProvider = t, this.onContentChanged = new l.EventEmitter, this.onSelectionChanged = new l.EventEmitter, this.internalModel = "", this.tinyEditorBasicSettings = { setup: function(e) { e.on("init", (function(t) { setTimeout(()=>e.getContainer() ? e.getContainer().querySelector('[aria-label="Insert/edit link"]').setAttribute("title", "Insert Link/File") : null, 0) } )) }, plugins: "image, charmap, code, link, lists, advlist, table", suffix: ".min", base_url: Object(s.a)(this.getTinyAssetsUrl("assets/tinymce")), branding: !1, browser_spellcheck: !0, font_formats: this.fontList, relative_urls: !1, convert_urls: !1, content_css: Object(s.a)(this.getTinyAssetsUrl("assets/font.css")), content_style: "body { font-family: 'Lato', sans-serif; }", mobile: { theme: "silver", menubar: !1, height: 300, max_height: 500, max_width: 500, min_height: 400, statusbar: !1, toolbar: !1, plugins: ["autosave", "lists", "autolink"] } }, this.tinyEditorTakeSurveySettings = { toolbar1: "bold italic underline strikethrough superscript subscript | bullist numlist link | removeformat | charmap code | forecolor backcolor | styleselect fontselect fontsizeselect ", menubar: !1, fontsize_formats: "8px 10px 12px 14px 18px 24px 36px" }, this.tinyEditorAdminSettings = { toolbar1: "bold italic underline strikethrough superscript subscript | bullist numlist indent outdent link | image insertfile table | removeformat | charmap code | forecolor backcolor | styleselect fontselect fontsizeselect", menubar: !1, fontsize_formats: "8px 10px 12px 14px 18px 24px 36px", image_class_list: [{ title: "Default", value: "tiny_image_clearfix" }] }, this.acceptedFileExtensions = ".png, .pdf, .csv, .ppt, .doc, .pptx, .docx, .txt, .gif, .xls, .jpeg, .xlsx, .jpg", this.acceptedImageExtensions = ".png, .gif, .jpeg, .jpg", this.propagateChanges = ()=>{} , this.propagateTouch = ()=>{} } get fontList() { return r.map(e=>`${e.name}=${e.fontFamily}`).join(";") } getTinyAssetsUrl(e) { const t = window.__env && window.__env.virtualDirectory || ""; return "/" !== i.last(t) ? `${t}/${e}` : `${t}${e}` } getEditorSettings() { return a.a.isAdminSite ? i.assign(this.tinyEditorBasicSettings, this.tinyEditorAdminSettings, this.additionalParams, { placeholder: this.placeholder, images_upload_handler: this.imagesUploadHandler.bind(this), file_picker_types: "file image", file_browser_callback_types: "file image", file_picker_callback: this.fileUploadHandler.bind(this) }) : i.assign(this.tinyEditorBasicSettings, this.tinyEditorTakeSurveySettings, this.additionalParams, { placeholder: this.placeholder }) } ngOnInit() { this.tinyEditorSettings = this.getEditorSettings() } imagesUploadHandler(e, t, n) { if (this.checkExtension(e.filename(), this.acceptedImageExtensions)) { const l = new FormData; l.append("image", e.blob(), e.filename()), this.contentFileProvider.uploadContentFile(l).pipe(Object(o.a)()).subscribe(e=>{ t(e.file_url) } , e=>n(e)) } else n("Unsupported file type") } fileUploadHandler(e, t, n) { const l = "image" === n.filetype ? this.acceptedImageExtensions : this.acceptedFileExtensions , i = document.createElement("input"); i.setAttribute("type", "file"), i.setAttribute("accept", l), i.onchange = ()=>{ const t = i.files[0]; if (this.checkExtension(t.name, l)) { const l = new FormData; l.append(n.filetype, t, t.name), this.contentFileProvider.uploadContentFile(l).pipe(Object(o.a)()).subscribe(n=>{ e(n.file_url, { text: t.name }) } , t=>{ e("", { text: "" }), this.errorHandler(t) } ) } else e("", { text: "" }), this.toasterService.showError({ message: "Unsupported file type" }, !0) } , i.click() } checkExtension(e, t) { return i.some(t.split(", "), t=>i.includes(e, t)) } insertMergeCode(e) { this.tinyEditor.editor.execCommand("mceInsertContent", !1, e) } ngAfterViewInit() { this.tinyEditor.registerOnChange(this.propagateChanges), this.tinyEditor.registerOnTouched(this.propagateTouch), this.tinyEditor._element.setAttribute("aria-label", "Answer text"), this.tinyEditor._element.setAttribute("aria-hidden", "false") } onSelectionChange(e) { this.onSelectionChanged.emit(e) } onContentChange(e) { this.onContentChanged.emit(e) } errorHandler(e) { this.isLoading = !1 } writeValue(e) { this.internalModel = e, this.tinyEditor.writeValue(e) } registerOnChange(e) { this.propagateChanges = e } registerOnTouched(e) { this.propagateTouch = e } } }, ovWl: function(e, t, n) { "use strict"; n.d(t, "a", (function() { return l } )), n("CnHN"); class l { constructor() {} ngOnInit() {} } }, qEty: function(e, t, n) { "use strict"; n.d(t, "a", (function() { return i } )); var l = n("qIlG"); n("SGh+"), n("VYJ8"); class i { constructor(e, t) { this.identityStore = e, this.storageProvider = t } ngOnInit() { this.identityStore.isLoggedIn().pipe(Object(l.a)()).subscribe(e=>{ this.isLoggedIn = e } ) } signOut() { this.storageProvider.changeToLocalStorage(), this.identityStore.doSignOut() } } }, qGzQ: function(e, t, n) { "use strict"; n.d(t, "a", (function() { return a } )), n.d(t, "b", (function() { return r } )); var l = n("Mlb/") , i = (n("ZcRe"), n("vk2e")) , a = (n("D9PZ"), n("5WpM"), n("olnp"), n("REFQ"), n("ApBt"), n("rhUx"), n("mOWz"), l["\u0275crt"]({ encapsulation: 2, styles: [".mat-autocomplete-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;visibility:hidden;max-width:none;max-height:256px;position:relative;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.mat-autocomplete-panel.mat-autocomplete-visible{visibility:visible}.mat-autocomplete-panel.mat-autocomplete-hidden{visibility:hidden}.mat-autocomplete-panel-above .mat-autocomplete-panel{border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px}.mat-autocomplete-panel .mat-divider-horizontal{margin-top:-1px}.cdk-high-contrast-active .mat-autocomplete-panel{outline:solid 1px}\n"], data: {} })); function o(e) { return l["\u0275vid"](0, [(e()(), l["\u0275eld"](0, 0, [[2, 0], ["panel", 1]], null, 2, "div", [["class", "mat-autocomplete-panel"], ["role", "listbox"]], [[8, "id", 0]], null, null, null, null)), l["\u0275did"](1, 278528, null, 0, i.j, [l.IterableDiffers, l.KeyValueDiffers, l.ElementRef, l.Renderer2], { klass: [0, "klass"], ngClass: [1, "ngClass"] }, null), l["\u0275ncd"](null, 0)], (function(e, t) { e(t, 1, 0, "mat-autocomplete-panel", t.component._classList) } ), (function(e, t) { e(t, 0, 0, t.component.id) } )) } function r(e) { return l["\u0275vid"](2, [l["\u0275qud"](402653184, 1, { template: 0 }), l["\u0275qud"](671088640, 2, { panel: 0 }), (e()(), l["\u0275and"](0, [[1, 2]], null, 0, null, o))], null, null) } }, qQ1g: function(e, t, n) { "use strict"; n.d(t, "a", (function() { return u } )), n.d(t, "b", (function() { return p } )); var l = n("Mlb/") , i = n("470i") , a = n("XymR") , o = n("REFQ") , r = n("P6pJ") , s = n("LeB1") , d = n("vk2e") , u = (n("qEty"), n("RuiF"), n("nQZ5"), l["\u0275crt"]({ encapsulation: 2, styles: [], data: {} })); function c(e) { return l["\u0275vid"](0, [(e()(), l["\u0275eld"](0, 0, null, null, 3, "button", [["class", "btn-signout mat-focus-indicator"], ["mat-button", ""], ["type", "button"]], [[1, "disabled", 0], [2, "_mat-animation-noopable", null]], [[null, "click"]], (function(e, t, n) { var l = !0; return "click" === t && (l = !1 !== e.component.signOut() && l), l } ), i.d, i.b)), l["\u0275did"](1, 180224, null, 0, a.b, [l.ElementRef, o.h, [2, r.a]], null, null), (e()(), l["\u0275ted"](2, 0, [" ", "\n"])), l["\u0275pid"](131072, s.j, [s.k, l.ChangeDetectorRef])], null, (function(e, t) { e(t, 0, 0, l["\u0275nov"](t, 1).disabled || null, "NoopAnimations" === l["\u0275nov"](t, 1)._animationMode), e(t, 2, 0, l["\u0275unv"](t, 2, 0, l["\u0275nov"](t, 3).transform("SHARED.SIGNOUT"))) } )) } function p(e) { return l["\u0275vid"](0, [(e()(), l["\u0275and"](16777216, null, null, 1, null, c)), l["\u0275did"](1, 16384, null, 0, d.l, [l.ViewContainerRef, l.TemplateRef], { ngIf: [0, "ngIf"] }, null)], (function(e, t) { e(t, 1, 0, t.component.isLoggedIn) } ), null) } }, rNez: function(e, t, n) { "use strict"; n.d(t, "a", (function() { return r } )), n.d(t, "b", (function() { return s } )); var l = n("Mlb/") , i = (n("IYhj"), n("5WpM"), n("olnp")) , a = (n("REFQ"), n("vk2e"), n("ApBt")) , o = n("P6pJ") , r = (n("cFTH"), l["\u0275crt"]({ encapsulation: 2, styles: [".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:transparent;outline:0}.mat-radio-label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:transform ease 280ms,background-color ease 280ms;width:20px;transform:scale(0.001)}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5)}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}.mat-radio-label-content{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{bottom:0;left:50%}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}\n"], data: {} })); function s(e) { return l["\u0275vid"](2, [l["\u0275qud"](671088640, 1, { _inputElement: 0 }), (e()(), l["\u0275eld"](1, 0, [["label", 1]], null, 12, "label", [["class", "mat-radio-label"]], [[1, "for", 0]], null, null, null, null)), (e()(), l["\u0275eld"](2, 0, null, null, 7, "div", [["class", "mat-radio-container"]], null, null, null, null, null)), (e()(), l["\u0275eld"](3, 0, null, null, 0, "div", [["class", "mat-radio-outer-circle"]], null, null, null, null, null)), (e()(), l["\u0275eld"](4, 0, null, null, 0, "div", [["class", "mat-radio-inner-circle"]], null, null, null, null, null)), (e()(), l["\u0275eld"](5, 0, [[1, 0], ["input", 1]], null, 0, "input", [["class", "mat-radio-input cdk-visually-hidden"], ["type", "radio"]], [[8, "id", 0], [8, "checked", 0], [8, "disabled", 0], [8, "tabIndex", 0], [1, "name", 0], [1, "value", 0], [8, "required", 0], [1, "aria-label", 0], [1, "aria-labelledby", 0], [1, "aria-describedby", 0]], [[null, "change"], [null, "click"]], (function(e, t, n) { var l = !0 , i = e.component; return "change" === t && (l = !1 !== i._onInputChange(n) && l), "click" === t && (l = !1 !== i._onInputClick(n) && l), l } ), null, null)), (e()(), l["\u0275eld"](6, 0, null, null, 3, "div", [["class", "mat-radio-ripple mat-focus-indicator mat-ripple"], ["mat-ripple", ""]], [[2, "mat-ripple-unbounded", null]], null, null, null, null)), l["\u0275did"](7, 212992, null, 0, i.v, [l.ElementRef, l.NgZone, a.a, [2, i.k], [2, o.a]], { centered: [0, "centered"], radius: [1, "radius"], animation: [2, "animation"], disabled: [3, "disabled"], trigger: [4, "trigger"] }, null), l["\u0275pod"](8, { enterDuration: 0 }), (e()(), l["\u0275eld"](9, 0, null, null, 0, "div", [["class", "mat-ripple-element mat-radio-persistent-ripple"]], null, null, null, null, null)), (e()(), l["\u0275eld"](10, 0, null, null, 3, "div", [["class", "mat-radio-label-content"]], [[2, "mat-radio-label-before", null]], null, null, null, null)), (e()(), l["\u0275eld"](11, 0, null, null, 1, "span", [["style", "display:none"]], null, null, null, null, null)), (e()(), l["\u0275ted"](-1, null, ["\xa0"])), l["\u0275ncd"](null, 0)], (function(e, t) { var n = t.component , i = e(t, 8, 0, 150); e(t, 7, 0, !0, 20, i, n._isRippleDisabled(), l["\u0275nov"](t, 1)) } ), (function(e, t) { var n = t.component; e(t, 1, 0, n.inputId), e(t, 5, 0, n.inputId, n.checked, n.disabled, n.tabIndex, n.name, n.value, n.required, n.ariaLabel, n.ariaLabelledby, n.ariaDescribedby), e(t, 6, 0, l["\u0275nov"](t, 7).unbounded), e(t, 10, 0, "before" == n.labelPosition) } )) } }, xqk0: function(e, t, n) { "use strict"; n.d(t, "a", (function() { return d } )), n.d(t, "b", (function() { return u } )); var l = n("Mlb/") , i = n("Mdc6") , a = (n("vk2e"), n("QZuW")) , o = l["\u0275crt"]({ encapsulation: 0, styles: ["[_nghost-%COMP%] { display: block; }"], data: {} }); function r(e) { return l["\u0275vid"](0, [(e()(), l["\u0275and"](0, null, null, 0))], null, null) } function s(e) { return l["\u0275vid"](0, [(e()(), l["\u0275and"](0, null, null, 0, null, r))], null, null) } n("ket5"), n("2R8b"), n("ZnKF"); var d = l["\u0275crt"]({ encapsulation: 0, styles: [[""]], data: {} }); function u(e) { return l["\u0275vid"](2, [l["\u0275qud"](402653184, 1, { tinyEditor: 0 }), (e()(), l["\u0275eld"](1, 0, null, null, 5, "editor", [["apiKey", "test"]], [[2, "ng-untouched", null], [2, "ng-touched", null], [2, "ng-pristine", null], [2, "ng-dirty", null], [2, "ng-valid", null], [2, "ng-invalid", null], [2, "ng-pending", null]], [[null, "onSelectionChange"], [null, "onChange"]], (function(e, t, n) { var l = !0 , i = e.component; return "onSelectionChange" === t && (l = !1 !== i.onSelectionChange(n) && l), "onChange" === t && (l = !1 !== i.onContentChange(n) && l), l } ), s, o)), l["\u0275did"](2, 4374528, [[1, 4], ["tinyEditor", 4]], 0, i.a, [l.ElementRef, l.NgZone, l.PLATFORM_ID, [2, i.c]], { apiKey: [0, "apiKey"], init: [1, "init"] }, { onSelectionChange: "onSelectionChange", onChange: "onChange" }), l["\u0275prd"](1024, null, a.p, (function(e) { return [e] } ), [i.a]), l["\u0275did"](4, 671744, null, 0, a.u, [[8, null], [8, null], [8, null], [6, a.p]], { model: [0, "model"] }, null), l["\u0275prd"](2048, null, a.q, null, [a.u]), l["\u0275did"](6, 16384, null, 0, a.r, [[4, a.q]], null, null)], (function(e, t) { var n = t.component; e(t, 2, 0, "test", n.tinyEditorSettings), e(t, 4, 0, n.internalModel) } ), (function(e, t) { e(t, 1, 0, l["\u0275nov"](t, 6).ngClassUntouched, l["\u0275nov"](t, 6).ngClassTouched, l["\u0275nov"](t, 6).ngClassPristine, l["\u0275nov"](t, 6).ngClassDirty, l["\u0275nov"](t, 6).ngClassValid, l["\u0275nov"](t, 6).ngClassInvalid, l["\u0275nov"](t, 6).ngClassPending) } )) } } }]);
Write, Run & Share Javascript code online using OneCompiler's JS online compiler for free. It's one of the robust, feature-rich online compilers for Javascript language. Getting started with the OneCompiler's Javascript editor is easy and fast. The editor shows sample boilerplate code when you choose language as Javascript and start coding.
Javascript(JS) is a object-oriented programming language which adhere to ECMA Script Standards. Javascript is required to design the behaviour of the web pages.
var readline = require('readline');
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
terminal: false
});
rl.on('line', function(line){
console.log("Hello, " + line);
});
Keyword | Description | Scope |
---|---|---|
var | Var is used to declare variables(old way of declaring variables) | Function or global scope |
let | let is also used to declare variables(new way) | Global or block Scope |
const | const is used to declare const values. Once the value is assigned, it can not be modified | Global or block Scope |
let greetings = `Hello ${name}`
const msg = `
hello
world!
`
An array is a collection of items or values.
let arrayName = [value1, value2,..etc];
// or
let arrayName = new Array("value1","value2",..etc);
let mobiles = ["iPhone", "Samsung", "Pixel"];
// accessing an array
console.log(mobiles[0]);
// changing an array element
mobiles[3] = "Nokia";
Arrow Functions helps developers to write code in concise way, it’s introduced in ES6.
Arrow functions can be written in multiple ways. Below are couple of ways to use arrow function but it can be written in many other ways as well.
() => expression
const numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
const squaresOfEvenNumbers = numbers.filter(ele => ele % 2 == 0)
.map(ele => ele ** 2);
console.log(squaresOfEvenNumbers);
let [firstName, lastName] = ['Foo', 'Bar']
let {firstName, lastName} = {
firstName: 'Foo',
lastName: 'Bar'
}
const {
title,
firstName,
lastName,
...rest
} = record;
//Object spread
const post = {
...options,
type: "new"
}
//array spread
const users = [
...adminUsers,
...normalUsers
]
function greetings({ name = 'Foo' } = {}) { //Defaulting name to Foo
console.log(`Hello ${name}!`);
}
greet() // Hello Foo
greet({ name: 'Bar' }) // Hi Bar
IF is used to execute a block of code based on a condition.
if(condition){
// code
}
Else part is used to execute the block of code when the condition fails.
if(condition){
// code
} else {
// code
}
Switch is used to replace nested If-Else statements.
switch(condition){
case 'value1' :
//code
[break;]
case 'value2' :
//code
[break;]
.......
default :
//code
[break;]
}
For loop is used to iterate a set of statements based on a condition.
for(Initialization; Condition; Increment/decrement){
//code
}
While is also used to iterate a set of statements based on a condition. Usually while is preferred when number of iterations are not known in advance.
while (condition) {
// code
}
Do-while is also used to iterate a set of statements based on a condition. It is mostly used when you need to execute the statements atleast once.
do {
// code
} while (condition);
ES6 introduced classes along with OOPS concepts in JS. Class is similar to a function which you can think like kind of template which will get called when ever you initialize class.
class className {
constructor() { ... } //Mandatory Class method
method1() { ... }
method2() { ... }
...
}
class Mobile {
constructor(model) {
this.name = model;
}
}
mbl = new Mobile("iPhone");