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qBmC,OACvBnC,EAAE,gCAAgCoC,YAAY,QACvCmjB,oBACT,IAEAvlB,EAAE,qCAAqCiB,GAAG,SAAS,WAGjD,OAFAjB,EAAE,gCAAgCqC,SAAS,QAC3CrC,EAAE,qBAAqBsC,OAChBijB,oBACT,IAEAvlB,EAAE,6BAA6BuC,QAAQ,SACvCvC,EAAE,yBAAyBuC,QAAQ,UACnCvC,EAAE,0BAA0BuC,QAAQ,UACpCvC,EAAE,8BAA8BuC,QAAQ,UACxCvC,EAAE,0BAA0BuC,QAAQ,UACpCgjB,qBAEAvlB,EAAE,uBAAuBgB,IAAI,SACtBhB,EAAE,uBAAuBiB,GAAG,SAAS,WAC1C,GAA8B,KAA1BjB,EAAE,cAAcgC,MAElB,OADAhC,EAAE,UAAU+C,SACL7B,YAAYC,MAAM,oCAAqC,KAE9D,IAAIskB,EAAezlB,EAAE,kDAAkDD,OASvE,IAAIkG,EAAOjG,EAAE,4BACT0lB,EAAazf,EAAK0f,YACtBD,EAAaA,kBAA8C,GAAK,IAChE1lB,EAAEmD,KAAK,CACLyiB,OAAQ,OACRxiB,IAAK6C,EAAKnC,KAAK,UACf1D,KAAMslB,EACNG,SAAU,WAGZ7lB,EAAE,2BAA2B6C,MAAM,QAEvC,GACF,EAGA7C,EAAEX,UAAUmD,MAAMgjB,GAClBnmB,SAASC,iBAAiB,gBAAiBkmB,E","sources":["webpack://app/./app/javascript/frontend/tribute_user.js","webpack://app/./app/javascript/frontend/break_rounds.js","webpack://app/./app/javascript/frontend/brief_rounds.js","webpack://app/./app/javascript/frontend/common.js","webpack://app/./app/javascript/admin/ideas.js","webpack://app/./app/javascript/admin/charts.js","webpack://app/./app/javascript/frontend/tribute_user_description.js","webpack://app/./app/javascript/frontend/users.js","webpack://app/./app/javascript/frontend/rounds.js","webpack://app/./app/javascript/admin/confetti.js","webpack://app/./app/javascript/shared/tinymce.js","webpack://app/./app/javascript/frontend/brain_storm_rounds.js","webpack://app/./app/javascript/frontend/invite_rounds.js"],"sourcesContent":["import Tribute from 'tributejs'\ndocument.addEventListener('DOMContentLoaded', () => {\n var tribute = new Tribute({\n values: function (search, cb) {\n getUsernames(search, users => cb(users))\n },\n selectClass: 'element-hover',\n itemClass: 'flex items-center gap-2 py-2 px-3',\n menuItemTemplate: function (item) {\n return '' +' ' + ' @'+ item.original.key + '';\n },\n\n });\n \n if ($(\".mention\").length > 0){\n tribute.attach(document.getElementsByClassName(\"mention\"));\n }\n else if ($(\".mentioned\").length > 0){\n tribute.attach(document.getElementsByClassName(\"mentioned\"));\n }\n function getUsernames(query, callback) {\n if (query.length < 1) {\n return false;\n } else {\n return $.getJSON('/mentions', {\n q: query,\n inbox: $(\".mention\").data(\"mission-id\")\n }, function(data) {\n if (data){\n callback(data);\n } else {\n callback([]);\n }\n });\n }\n }\n});","/*\n * decaffeinate suggestions:\n * DS102: Remove unnecessary code created because of implicit returns\n * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md\n */\n// Place all the behaviors and hooks related to the matching controller here.\n// All this logic will automatically be available in application.js.\n// You can use CoffeeScript in this file: http://coffeescript.org/\nimport {tinymce, tinymce_settings} from '../shared/tinymce';\nwindow.break_round_image = function() {\n $(\".break-round-image:visible\").off(\"change\");\n return $(\".break-round-image:visible\").on(\"change\", function() {\n return Materialize.toast(\"Please save the round to preview the image.\", 2000);\n });\n};\nwindow.break_rounds_ready = function() {\n if(document.querySelector('.tinymce')) {\n tinymce.init(tinymce_settings);\n }\n //Preview of break Round\n $('.break_round_duration:visible').on(\"change\", function() {\n\n var date = new Date(parseFloat($(this).data('start-date')));\n\n // $('.break-start-date:visible')[0].setAttribute(\"class\", \"preview-h5\")\n // $('.break-start-date:visible').text(\"Start date\")\n $('.break-start-date-area').text(date_to_string(date));\n\n // $('.break-end-date:visible')[0].setAttribute(\"class\", \"preview-h5\")\n // $('.break-end-date:visible').text(\"End date\")\n $('.break-end-date-area').text(date_to_string(get_end_date($('.break_round_duration:visible').data('start-date'),$('.break_round_duration:visible').data('duration'),$('.break_round_duration_hours:visible').val())));\n\n // $('.break-duration:visible')[0].setAttribute(\"class\", \"preview-h5\")\n // $('.break-duration:visible').text(\"Break Duration\")\n var time = $('.break_round_duration_hours').val().split(\":\");\n return $('.break-duration-area').text($('.break_round_duration:visible').val()+\"D \"+ time[0] + \"H \"+time[1]+\"M\");\n });\n\n $('.break_round_duration_hours:visible').on(\"change\", function() {\n // $('.break-duration:visible')[0].setAttribute(\"class\", \"preview-h5\")\n // $('.break-duration:visible').text(\"Break Duration\")\n var time = $('.break_round_duration_hours:visible').val().split(\":\");\n $('.break-duration-area').text($('.break_round_duration:visible').val()+\"D \"+ time[0] + \"H :\"+time[1]+\"M\");\n return $('.break-end-date-area').text(date_to_string(get_end_date($('.break_round_duration:visible').data('start-date'),$('.break_round_duration:visible').data('duration'),$('.break_round_duration_hours:visible').val())));\n });\n\n $('.break_round_description:visible').on(\"input\", function() {\n return (\n // $('.break-text-preview:visible')[0].setAttribute(\"class\", \"preview-h5\")\n // $('.break-text-preview:visible').text(\"Break Text\")\n $('.break-text-preview-area').text($('.break_round_description:visible').val())\n );\n });\n\n $(\".break-round-show-advance-fields\").on(\"click\", function() {\n $(\".break-round-adv\").hide();\n $(\".break-round-advance-fields\").removeClass('hide');\n return break_round_image();\n });\n\n $(\".break-round-hide-advance-fields\").on(\"click\", function() {\n $(\".break-round-advance-fields\").addClass('hide');\n $(\".break-round-adv\").show();\n return break_round_image();\n });\n\n $('.break_round_duration:visible').trigger('change');\n $('.break_round_duration_hours:visible').trigger('change');\n $('.break_round_description:visible').trigger('input');\n return break_round_image();\n};\n$(document).ready(break_rounds_ready);\ndocument.addEventListener('ajax:complete', break_rounds_ready);\n","import {\n tinymce,\n tinymce_settings\n} from '../shared/tinymce';\n\nwindow.brief_round_image = function() {\n $(\".brief-round-image:visible\").off(\"change\");\n return $(\".brief-round-image:visible\").on(\"change\", function() {\n return Materialize.toast(\"Please save the round to preview the image.\", 2000);\n });\n};\n\nwindow.brief_rounds_ready = function() {\n var new_brief_page;\n if(document.querySelector('.tinymce')) {\n tinymce.init(tinymce_settings);\n }\n\n $('.brief_round_duration_field:visible').on(\"change\", function() {\n var date, time;\n date = new Date(parseFloat($(this).data('start-date')));\n $('.brief-start-date:visible').addClass(\"preview-h5\");\n $('.brief-start-date:visible').text(\"Start date\");\n $('.brief-start-date-area:visible').text(date_to_string(date));\n $('.brief-end-date-area:visible').text(date_to_string(get_end_date($('.brief_round_duration_field:visible').data('start-date'), $('.brief_round_duration_field:visible').data('duration'), $('.brief_round_duration_hours:visible').val())));\n $('.brief-duration-title').addClass(\"preview-h5\");\n $('.brief-duration-title').text(\"Briefing Duration\");\n time = $('.brief_round_duration_hours:visible').val().split(\":\");\n return $('.brief-duration-area:visible').text($('.brief_round_duration_field:visible').data('duration') + \"D \" + time[0] + \"H \" + time[1] + \"M\");\n });\n $('.brief_round_duration_hours:visible').on(\"change\", function() {\n var time;\n time = $('.brief_round_duration_hours:visible').val().split(\":\");\n $('.brief-duration-area:visible').text($('.brief_round_duration_field:visible').data('duration') + \"D \" + time[0] + \"H :\" + time[1] + \"M\");\n return $('.brief-end-date-area:visible').text(date_to_string(get_end_date($('.brief_round_duration_field:visible').data('start-date'), $('.brief_round_duration_field:visible').data('duration'), $('.brief_round_duration_hours:visible').val())));\n });\n $('.brief_round_brief_text:visible').on(\"input\", function() {\n return $('.brief-text-preview-area:visible').text($('.brief_round_brief_text:visible').val());\n });\n $('.brief_round_duration_field:visible').trigger('change');\n $('.brief_round_duration_hours:visible').trigger('change');\n $('.brief_round_brief_text:visible').trigger('input');\n $('#modal-empty-brief').off(\"click\");\n $('#modal-empty-brief').on(\"click\", function(event) {\n $('#prompt-dialogbox').modal('open');\n return setTimeout(function() {\n $('#prompt-dialogbox').modal('close');\n return $('.lean-overlay').remove();\n }, 5000);\n });\n $('#close-modal-empty-brief').off(\"click\");\n $('#close-modal-empty-brief').on(\"click\", function(event) {\n $('#prompt-dialogbox').modal('close');\n return $('.lean-overlay').remove();\n });\n $('.open-pages-dialogue').on(\"click\", function(event) {\n var element;\n event.preventDefault();\n $('.brief-page-update').removeClass('active-page');\n $('.brief-page-update').first().addClass('active-page');\n element = $(this);\n return $.ajax({\n url: element.data(\"view-url\"),\n data: {},\n success: function(data) {\n var $toast_content, i, len, ref, round_id, single_url;\n $(\"#pages-view-modal\").find(\".pages-view-content\").html(data);\n round_id = $('#round_info').val();\n ref = $('.fetch-page-details');\n for (i = 0, len = ref.length; i < len; i++) {\n single_url = ref[i];\n $(single_url).attr('data-view-url', \"/missions/separate-pages/rounds/\" + round_id + \"/round_pages/show_sequence_number\");\n }\n $toast_content = $(\"#status-messages\");\n if ($toast_content.length !== 0 && $toast_content.html() !== \"\") {\n $(\"#status-messages\").css(\"display\", \"block\");\n Materialize.toast($toast_content, 1000000);\n }\n return $(\"#pages-description\").modal('open');\n }\n });\n });\n new_brief_page = function(element) {\n $('.brief-page-update').removeClass('active-page');\n element.find('a').addClass('active-page');\n return $.ajax({\n url: element.attr(\"data-view-url\"),\n data: {\n sequence_number: element.data(\"id\")\n },\n success: function(data) {\n var $toast_content;\n $(\"#pages-view-modal\").find(\".pages-view-content\").html(data);\n $toast_content = $(\"#status-messages\");\n if ($toast_content.length !== 0 && $toast_content.html() !== \"\") {\n $(\"#status-messages\").css(\"display\", \"block\");\n Materialize.toast($toast_content, 1000000);\n }\n return $('.media_type').on(\"click\", function() {\n var selected_element;\n selected_element = $(this).val();\n if (selected_element === \"image\") {\n $(\".page-image\").css(\"display\", \"block\");\n return $(\".page-video\").css(\"display\", \"none\");\n } else if (selected_element === \"video\") {\n $(\".page-video\").css(\"display\", \"block\");\n return $(\".page-image\").css(\"display\", \"none\");\n }\n });\n }\n });\n };\n $('.fetch-page-details').off(\"click\");\n $('.fetch-page-details').on(\"click\", function(event) {\n var approved, attachment_url, current_seq_number, description, element, embedded_video_code, image_url, seq_num;\n event.preventDefault();\n $(\"#status-messages\").css(\"display\", \"none\");\n $(\"#status-messages\").html(\"\");\n $(\"#status-messages\").remove();\n element = $(this);\n current_seq_number = $(document).find('#round_page_sequence_number').val();\n seq_num = element.data(\"id\");\n description = $('#round_page_description').val();\n attachment_url = $('#round_page_attachment_url').val();\n image_url = $('#round_page_image_url').val();\n embedded_video_code = $('#round_page_embedded_video_code').val();\n approved = $('.approve-check')[0].checked;\n return $.ajax({\n url: element.attr(\"data-view-url\"),\n data: {\n sequence_number: current_seq_number,\n page_click: true,\n description: description,\n attachment_url: attachment_url,\n image_url: image_url,\n embedded_video_code: embedded_video_code,\n approved: approved\n },\n success: function(result) {\n var confirmation_variable, difference_check, round_page;\n difference_check = false;\n if (result.status !== true) {\n round_page = result.round_page;\n if (result.difference_check === true) {\n confirmation_variable = confirm(\"Do you want to leave this briefing page without saving ?\");\n if (confirmation_variable === true) {\n return new_brief_page(element);\n }\n } else {\n return new_brief_page(element);\n }\n } else {\n confirmation_variable = confirm(\"Do you want to leave this briefing page without saving ?\");\n if (confirmation_variable === true) {\n return new_brief_page(element);\n }\n }\n }\n });\n });\n $(\".brief-round-show-advance-fields\").on(\"click\", function() {\n $(\".brief-round-adv\").hide();\n $(\".brief-round-advance-fields\").removeClass('hide');\n return brief_round_image();\n });\n $(\".brief-round-hide-advance-fields\").on(\"click\", function() {\n $(\".brief-round-advance-fields\").addClass('hide');\n $(\".brief-round-adv\").show();\n return brief_round_image();\n });\n return brief_round_image();\n};\n\n$(document).ready(function() {\n return brief_rounds_ready;\n});\n\ndocument.addEventListener('ajax:complete', brief_rounds_ready);\n","/*\n * decaffeinate suggestions:\n * DS102: Remove unnecessary code created because of implicit returns\n * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md\n */\nimport $ from 'jquery';\nimport 'kbw-countdown/dist/js/jquery.plugin';\nimport 'kbw-countdown/dist/js/jquery.countdown';\n\nexport var start_timers = function start_timers() {\n return $('.time-disposeable').each(function() {\n var newtime = new Date(parseFloat($(this).data('time')));\n var diff = (newtime - new Date())/1000;\n if(diff >= 259200) { // 259200 = 3 days\n return $(this).countdown({until: diff, compact: true, layout: '{dn}d {hnn}h {mnn}m {desc}',format: 'dHM', description: '', onTick: watch_countdown});\n } else {\n return $(this).countdown({until: diff, compact: true, layout: '{hnn}h {mnn}m {snn}s {desc}', format:'HMS', description: '', onTick: watch_countdown});\n }\n });\n};\n\nexport var watch_countdown = function watch_countdown(periods) {\n var new_layout = null;\n if (periods[3] > 0) {\n new_layout = '{dn}d {hnn}h {mnn}m {desc}';\n } else {\n new_layout = '{hnn}h {mnn}m {snn}s {desc}';\n }\n\n if (new_layout && ($(this).countdown('option','layout') !==new_layout)) {\n return $(this).countdown('option',{layout: new_layout});\n }\n };\nexport var disable_default_form_submit = function disable_default_form_submit() {\n $('.ajax-submit').on('submit', function(event) {\n event.preventDefault();\n });\n};\n","/*\n * decaffeinate suggestions:\n * DS102: Remove unnecessary code created because of implicit returns\n * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md\n */\nvar idea_ready = function idea_ready() {\n $('#create-idea-admin').off(\"click\");\n $(\"[id^='create-idea-admin']\").on(\"click\", function() {\n this.classList.add('button-clicked')\n event.preventDefault();\n var form = $('.new_idea_form');\n var isValid = true;\n var firstInvalidField = null; // To store the first invalid field\n if ($('#photo_required').length > 0) {\n if ($('#photo_required').data('value') && !$('#photo_present').data('value')){\n if ($('#idea_image').val() == ''){\n isValid = false;\n $('#idea_image').addClass('invalid'); // Add 'invalid' class to highlight the field\n $('#idea_image').siblings('.error-message').remove(); // Remove any previous error messages\n $('#idea_image').after('
Please fill in the required field.
');\n Materialize.toast(\"Idea Image can not be empty.\", 2000);\n return; // Skip validation for TinyMCE fields\n }\n }\n }\n\n if ($('#description_required')) {\n if ($('#description_required').data('value')){\n var content = tinymce.get(\"idea_content\").getContent();\n function stripHtmlTags(html) {\n var tempDiv = document.createElement(\"div\");\n tempDiv.innerHTML = html;\n return tempDiv.textContent || tempDiv.innerText || \"\";\n }\n var plainTextContent = stripHtmlTags(content);\n \n if(plainTextContent == ''){\n isValid = false;\n var activeEditor = tinymce.activeEditor;\n if (activeEditor) {\n activeEditor.focus()\n }\n Materialize.toast(\"Idea Description can not be empty.\", 2000);\n return; // Skip validation for TinyMCE fields\n }\n }\n }\n\n if ($('#tags_required').length > 0) {\n if ($('#tags_required').data('value')){\n if($('.tag-button') && $('.tag-button').length == 0){\n isValid = false;\n $('.add-tag-input').addClass('invalid'); // Add 'invalid' class to highlight the field\n $('.add-tag-input').siblings('.error-message').remove(); // Remove any previous error messages\n $('.add-tag-input').after('
Please fill in the required field.
');\n $('.add-tag-input').focus()\n Materialize.toast(\"Idea Tags can not be empty.\", 2000);\n return; // Skip validation for TinyMCE fields\n }\n }\n }\n form.find('[required]').each(function() {\n var field = $(this);\n if (field.hasClass('tinymce')) {\n return; // Skip validation for TinyMCE fields\n }\n if (!field.val()) {\n isValid = false;\n field.addClass('invalid'); // Add 'invalid' class to highlight the field\n field.siblings('.error-message').remove(); // Remove any previous error messages\n field.after('
Please fill in the required field.
'); // Display error message\n if (!firstInvalidField) {\n firstInvalidField = field;\n }\n } else {\n field.removeClass('invalid'); // Remove 'invalid' class if field has a value\n field.siblings('.error-message').remove(); // Remove error message\n }\n\n if (!isValid) {\n if (firstInvalidField) {\n firstInvalidField.focus(); // Set focus to the first invalid field\n }\n return; // Prevent further execution if there are validation errors\n }\n });\n \n if (!isValid) {\n event.preventDefault();\n } else {\n if (!$(\".idea_title\").val() || $(\".idea_title\").val().trim()=='') {\n $('.toast').remove();\n Materialize.toast(\"Title can not be empty.\", 2000);\n $(\".idea_title\").focus();\n return;\n }\n else if($('#idea_funnel_id').val()==''){\n $('.toast').remove();\n Materialize.toast(\"Funnel can not be empty.\", 2000);\n return;\n }\n else if($('#idea_funnel_stage_id').val()==''){\n $('.toast').remove();\n Materialize.toast(\"Funnel stage can not be empty.\", 2000);\n return;\n }\n else{\n Materialize.toast(\"Idea has been saved.\", 2000);\n if(this.classList.contains('save_and_stay')){\n $('#idea_save_and_stay').val('true')\n }\n return $('.new_idea_form')[0].submit();\n }\n }\n });\n};\n\ndocument.addEventListener('DOMContentLoaded', function() {\n var title_field = $('#idea-title-field')\n title_field.on('input', function() {\n var inputValue = title_field.val();\n var lastCharacter = inputValue[inputValue.length - 1];\n \n function isSpecialCharacter(char) {\n var specialChars = \"!@#$%^&*()_-=\\\"+[]{}|;':,.<>?/`~\";\n return specialChars.indexOf(char) !== -1;\n }\n if (lastCharacter === ' ' || isSpecialCharacter(lastCharacter)) {\n console.log('Focusout event triggered');\n var id = this.dataset.id;\n const content = title_field.val();\n console.log('Content', content)\n if(window.location.href.includes('ideabox') && window.location.href.includes('settings')){\n return $.ajax({\n type: \"POST\",\n url: \"/ideas/add_idea_tag\",\n data: { content: content, id: id, tag_for_mission: true },\n success: function (data) {\n },\n });\n }else{\n return $.ajax({\n type: \"POST\",\n url: \"/ideas/add_idea_tag\",\n data: { content: content, id: id },\n success: function (data) {\n },\n });\n }\n }\n });\n tinymce.init({\n selector: '.idea-description-content.field textarea',\n plugins: 'autolink lists link paste',\n paste_as_text: true,\n menubar: false,\n content_css: '/assets/tinymce.css',\n skin: 'oxide',\n toolbar: 'undo redo | pastetext removeformat | bold italic underline | alignleft aligncenter alignright alignjustify | link bullist numlist | backcolor emoticons blockquote | emoticons | menu-template-button | dynamic-button',\n setup: function(editor) {\n editor.on('input', function() {\n var content = tinymce.activeEditor.getContent();\n function stripHtmlTags(html) {\n var tempDiv = document.createElement(\"div\");\n tempDiv.innerHTML = html;\n return tempDiv.textContent || tempDiv.innerText || \"\";\n }\n var plainTextContent = stripHtmlTags(content);\n var lastCharacter = plainTextContent[plainTextContent.length - 1];\n \n function isSpecialCharacter(char) {\n var specialChars = \"!@#$%^&*()_-=\\\"+[]{}|;':,.<>?/`~ \";\n return specialChars.indexOf(char) !== -1;\n }\n if (lastCharacter === ' ' || lastCharacter === '\\u00A0' || isSpecialCharacter(lastCharacter)) {\n if(window.location.href.includes('ideabox') && window.location.href.includes('settings')){\n var str = this.formElement.id;\n var regex = /edit_mission_(\\d+)/;\n var match = str.match(regex);\n var id = match ? match[1] : null;\n return $.ajax({\n type: \"POST\",\n url: \"/ideas/add_idea_tag\",\n data: { content: plainTextContent, id: id, tag_for_mission: true },\n success: function (data) {\n },\n });\n }\n else{\n var str = this.formElement.id;\n var regex = /edit_idea_(\\d+)/;\n var match = str.match(regex);\n var id = match ? match[1] : null;\n return $.ajax({\n type: \"POST\",\n url: \"/ideas/add_idea_tag\",\n data: { content: plainTextContent, id: id },\n success: function (data) {\n },\n });\n }\n }\n });\n }\n });\n});\n\nfunction ready(fn) {\n if (document.readyState !== 'loading') {\n fn();\n } else {\n document.addEventListener('DOMContentLoaded', fn);\n }\n}\nready(idea_ready);\ndocument.addEventListener('ajax:complete', idea_ready);\n\n$(function() {\n $(document).on(\"change\", \"#idea_image\", function (event) {\n const $upload_section = $('.js-upload-section');\n $upload_section.addClass('is-loading');\n\n var file, fileObject, input, reader;\n file = void 0;\n input = void 0;\n reader = void 0;\n fileObject = {};\n input = $(event.currentTarget);\n file = input[0].files[0];\n if (!file) {\n return;\n }\n fileObject.filetype = file.type;\n fileObject.filename = file.name;\n reader = new FileReader();\n reader.onload = function (e) {\n var image_base64;\n image_base64 = e.target.result;\n fileObject.filecontent = image_base64;\n $(\"#filetype\").val(fileObject.filetype);\n $(\"#filename\").val(fileObject.filename);\n $(\"#image\").val(\n fileObject.filecontent.replace(\n /^data:image\\/(png|jpg|jpeg|gif);base64,/,\n \"\"\n )\n );\n };\n reader.readAsDataURL(file);\n return console.log(fileObject);\n });\n});\n","import Highcharts from 'highcharts';\n\nimport HighchartsMore from 'highcharts/highcharts-more';\n\nimport HighchartsBullet from 'highcharts/modules/bullet';\n\nimport HighchartsIndicators from 'highcharts/indicators/indicators';\n\nimport HighchartsExporting from 'highcharts/modules/exporting';\n\nimport HighchartsFunnel from 'highcharts/modules/funnel';\n\nimport HighchartsPattern from 'highcharts/modules/pattern-fill';\n\nimport HighchartsExportData from 'highcharts/modules/export-data';\n\nimport HighchartsGantt from 'highcharts/highcharts-gantt';\nimport Gantt from 'highcharts/modules/gantt';\n\n\nGantt(Highcharts);\n\nHighchartsMore(Highcharts);\n\nHighchartsBullet(Highcharts);\n\nHighchartsExporting(Highcharts);\n\nHighchartsPattern(Highcharts);\n\nHighchartsFunnel(Highcharts);\n\nHighchartsExportData(Highcharts);\n\nfunction hexToRgb(hex) {\n var r = parseInt(hex.substring(1, 3), 14);\n var g = parseInt(hex.substring(3, 5), 14);\n var b = parseInt(hex.substring(5, 7), 14);\n return [r, g, b];\n}\n\n// Function to convert RGB to hex color\nfunction rgbToHex(rgb) {\n return \"#\" + ((1 << 24) + (rgb[0] << 16) + (rgb[1] << 8) + rgb[2]).toString(16).slice(1);\n}\n\n// Function to generate lighter shades of a color\nfunction generateLighterShades(hexColor, numShades) {\n var rgbColor = hexToRgb(hexColor);\n var shades = [];\n\n for (var i = 0; i < numShades; i++) {\n var factor = i / (numShades - 1); // Adjust factor based on number of shades\n var shade = [\n Math.round(rgbColor[0] + (255 - rgbColor[0]) * factor),\n Math.round(rgbColor[1] + (255 - rgbColor[1]) * factor),\n Math.round(rgbColor[2] + (255 - rgbColor[2]) * factor)\n ];\n shades.push(rgbToHex(shade));\n }\n\n return shades;\n}\nif(document.getElementById('chart')){\n var chartColor = document.getElementById('chart').dataset.variable;\n}\nif(chartColor){\n // var colorList = generateLighterShades(chartColor, 10);\n var colorList = ['#545aff', '#3ccb7f', '#f63d68','#ff692e', '#bdb4fe', '#75e0a7', '#e478fa', '#67e3f9', '#875bf7', '#f97066', '#ee46bc', '#2ed3b7', '#ba24d5', '#fac515', '#53b1fd' ]\n}else{\n var colorList = ['#545aff', '#3ccb7f', '#f63d68','#ff692e', '#bdb4fe', '#75e0a7', '#e478fa', '#67e3f9', '#875bf7', '#f97066', '#ee46bc', '#2ed3b7', '#ba24d5', '#fac515', '#53b1fd' ]\n}\nvar mychart1 = Highcharts.setOptions({\n colors: colorList,\n chart: {\n inverted: false,\n // marginLeft: 135,\n type: 'bullet'\n },\n title: { text: null\n },\n legend: { enabled: false\n },\n yAxis: { gridLineWidth: 0\n },\n plotOptions: { series: {\n pointPadding: 0.25,\n borderWidth: 0,\n color: '#000',\n targetOptions: { width: '200%'\n }\n }\n },\n credits: { enabled: false\n },\n exporting: { enabled: true\n }\n});\n\nexport var tagGraphChart = function tagGraphChart() {\n\n var data = $(\"#tag-graph-container\").data(\"scores\");\n var dataSet = anychart.data.set(data);\n var colors = anychart.scales\n .ordinalColor()\n .colors([\"#26959f\", \"#f18126\", \"#3b8ad8\", \"#60727b\", \"#e24b26\"]);\n\n colors.ranges([\n { from: 1, to: 5 },\n { from: 6, to: 12 },\n { from: 1, to: 5 },\n { from: 13, to: 20 },\n { greater: 20 },\n ]);\n\n var chart = anychart.tagCloud();\n chart.height(\"100%\");\n chart.mode(\"spiral\");\n chart.title(\"Top 50 tags\")\n\n chart.data(dataSet).colorScale(colors).angles([-90, 0, 90]);\n\n var colorRange = chart.colorRange();\n colorRange.enabled(true).colorLineSize(15);\n\n chart.container(document.getElementById(\"tag-graph-container\"));\n\n chart.draw();\n\n var normalFillFunction = chart.normal().fill();\n var hoveredFillFunction = chart.hovered().fill();\n\n chart.listen(\"pointsHover\", function (e) {\n if (e.actualTarget === colorRange) {\n if (e.points.length) {\n chart.normal({\n fill: \"black 0.1\",\n });\n chart.hovered({\n fill: chart.colorScale().valueToColor(e.point.get(\"category\")),\n });\n } else {\n chart.normal({\n fill: normalFillFunction,\n });\n chart.hovered({\n fill: hoveredFillFunction,\n });\n }\n }\n });\n\n chart.listen(\"pointClick\", function (e) {\n var point = e.point.get(\"x_id\");\n var url = \"/topic/\" + point ;\n window.open(url, \"_blank\");\n });\n};\n\nexport var initSelectionBulletChart = function initSelectionBulletChart() {\n \n if ($('.highcharts-figure').length > 0) {\n if (!!$('#container1').length > 0) {\n var mychart2 = Highcharts.chart('container1', {\n chart: { marginTop: 40\n },\n title: { text: $('.highcharts-figure').data('title')\n },\n xAxis: { categories: [ '' + $('#container1').data('score1')['title'] + '' ]\n },\n yAxis: {\n plotBands: $('#container1').data('score1')['data'],\n title: null,\n max: $('#container1').data('score1')['max_value']\n },\n series: [ { data: [ {\n y: $('#container1').data('score1')['avg_score'],\n target: $('#container1').data('score1')['target'],\n color: $('#container1').data('score1')['color']\n } ] } ],\n tooltip: { \n headerFormat: $('#container1').data('score1')['title'].substring(0,47)+ '
',\n pointFormat: 'Avg score {point.y}. Target {point.target}'\n }\n }\n );\n }\n if (!!$('#container2').length > 0) {\n var mychart3 = Highcharts.chart('container2', {\n xAxis: { categories: [ '' + $('#container2').data('score2')['title'] + '' ]\n },\n yAxis: {\n plotBands: $('#container2').data('score2')['data'],\n title: null,\n max: $('#container2').data('score2')['max_value']\n },\n series: [ { data: [ {\n y: $('#container2').data('score2')['avg_score'],\n target: $('#container2').data('score2')['target'],\n color: $('#container2').data('score2')['color']\n } ] } ],\n tooltip: {\n headerFormat: $('#container2').data('score2')['title'].substring(0,47)+ '
', \n pointFormat: 'Avg score {point.y}. Target {point.target}'\n }\n }\n );\n }\n if (!!$('#container3').length > 0) {\n var mychart4 = Highcharts.chart('container3', {\n xAxis: { categories: [ '' + $('#container3').data('score3')['title'] + '' ]\n },\n yAxis: {\n plotBands: $('#container3').data('score3')['data'],\n title: null,\n max: $('#container3').data('score3')['max_value']\n },\n series: [ { data: [ {\n y: $('#container3').data('score3')['avg_score'],\n target: $('#container3').data('score3')['target'],\n color: $('#container3').data('score3')['color']\n } ] } ],\n tooltip: {\n headerFormat: $('#container3').data('score3')['title'].substring(0,47)+ '
', \n pointFormat: 'Avg score {point.y}. Target {point.target}'\n }\n }\n );\n }\n\n if (!!$('#container4').length > 0) {\n var mychart5 = Highcharts.chart('container4', {\n xAxis: { categories: [ '' + $('#container4').data('score4')['title'] + '' ]\n },\n yAxis: {\n plotBands: $('#container4').data('score4')['data'],\n title: null,\n max: $('#container4').data('score4')['max_value']\n },\n series: [ { data: [ {\n y: $('#container4').data('score4')['avg_score'],\n target: $('#container4').data('score4')['target'],\n color: $('#container4').data('score4')['color']\n } ] } ],\n tooltip: {\n headerFormat: $('#container4').data('score4')['title'].substring(0,47)+'
', \n pointFormat: 'Avg score {point.y}. Target {point.target}'\n }\n }\n );\n }\n if (!!$('#container5').length > 0) {\n var mychart6;\n return mychart6 = Highcharts.chart('container5', {\n xAxis: { categories: [ '' + $('#container5').data('score5')['title'] + '' ]\n },\n yAxis: {\n plotBands: $('#container5').data('score5')['data'],\n title: null,\n max: $('#container5').data('score5')['max_value']\n },\n series: [ { data: [ {\n y: $('#container5').data('score5')['avg_score'],\n target: $('#container5').data('score5')['target'],\n color: $('#container5').data('score5')['color']\n } ] } ],\n tooltip: { \n headerFormat: $('#container5').data('score5')['title'].substring(0,47)+ '
',\n pointFormat: 'Avg score {point.y}. Target {point.target}'\n }\n }\n );\n }\n }\n};\n\n\nexport var initProjectGanttChart = function() {\n var chart, data, dateFormat, day, defined, department, ed, em, end_date, ey, i, isObject, j, len, len1, project_data, reduce, score, score_data, scores, sd, series, sm, start_date, sy, today;\n series = [];\n today = new Date;\n day = 1000 * 60 * 60 * 24;\n dateFormat = Highcharts.dateFormat;\n defined = Highcharts.defined;\n isObject = Highcharts.isObject;\n reduce = Highcharts.reduce;\n today.setUTCHours(0);\n today.setUTCMinutes(0);\n today.setUTCSeconds(0);\n today.setUTCMilliseconds(0);\n today = today.getTime();\n if ($('#chart-container').length > 0) {\n scores = $('#chart-container').data('scores');\n data = [];\n for (i = 0, len = scores.length; i < len; i++) {\n score = scores[i];\n department = {};\n department['name'] = score[0]['name'];\n department['id'] = score[0]['department_id'];\n department['owner'] = '';\n department['pointWidth'] = 0;\n data.push(department);\n for (j = 0, len1 = score.length; j < len1; j++) {\n score_data = score[j];\n if (!!score_data['project_id']) {\n project_data = {};\n start_date = !!score_data['start'] && score_data['start'].split('-');\n sy = start_date[0];\n sm = start_date[1];\n sd = !!start_date[2] && start_date[2][0] + start_date[2][1];\n end_date = !!score_data['end'] && score_data['end'].split('-');\n ey = end_date[0];\n em = end_date[1];\n ed = !!end_date[2] && end_date[2][0] + end_date[2][1];\n project_data['start'] = Date.UTC(sy, sm - 1, sd);\n project_data['end'] = Date.UTC(ey, em - 1, ed);\n project_data['parent'] = score_data['department_id'];\n project_data['id'] = score_data['project_id'];\n project_data['owner'] = score_data['owner'];\n project_data['name'] = score_data['project_name'];\n project_data['completed'] = score_data['completed'];\n project_data['height'] = 200;\n project_data['stage'] = score_data['stage'];\n data.push(project_data);\n }\n }\n }\n return chart = Highcharts.ganttChart('chart-container', { \n chart: {\n height: 1\n },\n exporting: {\n enabled: true,\n width: 100,\n buttons: {\n contextButton: {\n enabled: true,\n menuItems: ['viewFullscreen', 'printChart', 'separator', 'downloadPNG', 'downloadJPEG', 'downloadPDF', 'downloadSVG']\n }\n }\n },\n series: [\n {\n events: {\n click: (function(_this) {\n return function(event) {\n var href;\n href = document.location.href;\n return document.location.href = '/studio/projects/' + event.point['id'] + '/edit';\n };\n })(this)\n },\n name: '',\n data: data\n }\n ],\n title: {\n text: ''\n },\n exporting: {\n enabled: true\n },\n rangeSelector: {\n enabled: true,\n allButtonsEnabled: true,\n buttons: [\n {\n type: 'month',\n count: 1,\n text: '1m',\n events: {\n click: function(event) {\n return Highcharts.charts[0].update({\n xAxis: {\n min: today,\n max: today + 30 * day\n }\n });\n }\n }\n }, {\n type: 'month',\n count: 3,\n text: '3m',\n events: {\n click: function(event) {\n return Highcharts.charts[0].update({\n xAxis: {\n min: today,\n max: today + 90 * day\n }\n });\n }\n }\n }, {\n type: 'month',\n count: 6,\n text: '6m',\n events: {\n click: function(event) {\n return Highcharts.charts[0].update({\n xAxis: {\n min: today,\n max: today + 180 * day\n }\n });\n }\n }\n }, {\n type: 'year',\n count: 1,\n text: '1y',\n click: function(event) {\n return Highcharts.charts[0].update({\n xAxis: {\n min: today,\n max: today + 365 * day\n }\n });\n }\n }, {\n type: 'all',\n text: 'All'\n }\n ]\n },\n navigator: {\n enabled: true,\n liveRedraw: true,\n series: {\n type: 'gantt',\n pointPlacement: 0.5,\n pointPadding: 0.25\n },\n yAxis: {\n min: 2,\n max: 2,\n reversed: true,\n categories: []\n }\n },\n scrollbar: {\n enabled: true\n },\n xAxis: {\n currentDateIndicator: false,\n min: today - 60 * day,\n max: today + 365 * day\n },\n tooltip: {\n pointFormatter: function() {\n var amount, completed, format, lines, options, point, status;\n point = this;\n format = '%d/%m/%y';\n options = point.options;\n completed = options.completed;\n amount = isObject(completed) ? completed.amount : completed;\n status = (amount || 0) * 100 + '%';\n lines = void 0;\n lines = [\n {\n value: point.name,\n style: 'font-weight: bold;'\n }, {\n value: dateFormat(format, point.start) + ' - ' + dateFormat(format, point.end)\n }, {\n value: options.owner\n }, {\n value: options.stage\n }\n ];\n return reduce(lines, (function(str, line) {\n var s, style;\n s = '';\n style = defined(line.style) ? line.style : 'font-size: 0.8em;';\n if (line.visible !== false) {\n s = '' + (defined(line.title) ? line.title + ': ' : '') + (defined(line.value) ? line.value : '') + '
';\n }\n return str + s;\n }), '');\n }\n }\n }, function(chart) {\n var chartHeight;\n chartHeight = 50 * chart.series[0].data.length;\n chart.update({\n chart: {\n height: chartHeight\n }\n });\n });\n }\n};\n\n\nexport var initPackedBubbleGraph = function() {\n // var colors = Highcharts.getOptions().colors;\n // function getRandomColor() {\n // return colors[Math.floor(Math.random() * colors.length)];\n // }\n var standardColors = [\n '#7cb5ec', '#434348', '#90ed7d', '#f7a35c', '#8085e9', '#f15c80',\n '#e4d354', '#2b908f', '#f45b5b', '#91e8e1'\n ];\n \n // Function to get a random color from the standard colors\n function getRandomColor() {\n return standardColors[Math.floor(Math.random() * standardColors.length)];\n }\n var redirect_scores, mission_id, myChart, score, scores,redirect_scores;\n if ($('#bubble-packed-container.all_inbox_packed_ideas').length > 0) {\n scores = $('#bubble-packed-container.all_inbox_packed_ideas').data('packed-scores');\n redirect_scores = $('#bubble-packed-container.all_inbox_packed_ideas').data('redirect');\n mission_id=$('#bubble-packed-container.all_inbox_packed_ideas').data('mission-id');\n return myChart = Highcharts.chart('bubble-packed-container', {\n chart: {\n type: 'packedbubble',\n height: '100%',\n // minHeight: '500px',\n // maxHeight: '100%',\n },\n title: {\n text: 'Tags based on number of ideas'\n },\n tooltip: {\n useHTML: true,\n pointFormat: '{point.name}: {point.value} likes'\n },\n legend: {\n layout: 'vertical',\n align: 'left',\n verticalAlign: 'top',\n floating: true,\n backgroundColor: '#FFFFFF'\n },\n plotOptions: {\n packedbubble: {\n minSize: '40%',\n maxSize: '100%',\n zMin: 1,\n zMax: 5,\n layoutAlgorithm: {\n gravitationalConstant: 8,\n splitSeries: true,\n seriesInteraction: false,\n dragBetweenSeries: true,\n parentNodeLimit: true\n },\n dataLabels: {\n enabled: true,\n parentNodeFormat: '{series.name}',\n format: '{point.name}',\n filter: {\n property: 'y',\n operator: '>',\n value: 0\n },\n style: {\n color: 'black',\n textOutline: 'none',\n textOverflow: 'clip',\n fontWeight: 'normal'\n }\n },\n events: {\n click: function(event) {\n if (!event.point.name){\n var href, j, len1, loc, selected_score;\n selected_score = null;\n for (j = 0, len1 = redirect_scores.length; j < len1; j++) {\n score = redirect_scores[j];\n if (score.data[0].name === this.name) {\n selected_score = score;\n break;\n }\n }\n if (!!selected_score) {\n href = document.location.href.split(\"/\");\n loc = href[0] + \"//\" + href[1] + href[2];\n var url = loc + \"/topic/\" + selected_score.tag_id ;\n // var url = loc + \"/tags\" + (\"/\" + selected_score.tag_id+ \"?ideabox_id=\"+ mission_id);\n window.open(url, \"_blank\");\n }\n }\n },\n }\n }\n },\n series: scores.map(function(score) {\n return {\n ...score,\n color: getRandomColor() // Assign a random color to each series\n };\n }),\n });\n }\n}\n\nexport var initLineTagsGraph = function() {\n var myChart;\n var months= $('#line-graph-container').data('month')\n var point_data= $('#line-graph-container').data('points')\n if ($('#line-graph-container').length > 0){\n return myChart = Highcharts.chart('line-graph-container', {\n chart: {\n type: 'line'\n },\n title: {\n text: 'Top 5 tags used over last 12 months'\n },\n \n // subtitle: {\n // text: 'Source: thesolarfoundation.com'\n // },\n \n yAxis: {\n title: {\n text: 'Number of Tags'\n }\n },\n \n xAxis: {\n categories: months,\n },\n \n legend: {\n layout: 'vertical',\n align: 'right',\n verticalAlign: 'middle'\n },\n \n plotOptions: {\n series: {\n label: {\n connectorAllowed: false\n },\n //pointStart: months[0]\n }\n },\n \n series: point_data,\n \n responsive: {\n rules: [{\n condition: {\n maxWidth: 500\n },\n chartOptions: {\n legend: {\n layout: 'horizontal',\n align: 'center',\n verticalAlign: 'bottom'\n }\n }\n }]\n }\n \n });\n }\n}\n\nexport var initInboxIdeasGraph = function() {\n var i, idea_title, len, myChart, score, scores, scores_data;\n if ($('#graph-container.inbox_ideas').length > 0) {\n scores = $('#graph-container.inbox_ideas').data('scores');\n scores_data = [];\n idea_title = \"\";\n for (i = 0, len = scores.length; i < len; i++) {\n score = scores[i];\n scores_data.push(score.data);\n }\n return myChart = Highcharts.chart('graph-container', {\n chart: {\n height: 530,\n backgroundColor: {\n linearGradient: [0, 0, 500, 650],\n stops: [[0, 'rgb(50,205,50)'], [0.4, 'rgb(255, 255, 255)'], [0.65, 'rgb(255, 255, 255)'], [1, 'rgb(255,160,122)']]\n },\n type: 'scatter'\n },\n title: {\n text: ' '\n },\n xAxis: {\n gridLineWidth: 1,\n title: {\n text: 'Investment'\n },\n min: 0,\n max: 10\n },\n yAxis: {\n gridLineWidth: 1,\n title: {\n text: 'Impact'\n },\n min: 0,\n max: 10\n },\n tooltip: {\n pointFormat: 'Impact: {point.y:,.0f}
Investment: {point.x}'\n },\n plotOptions: {\n series: {\n cursor: 'pointer'\n },\n line: {\n dataLabels: {\n enabled: true\n },\n enableMouseTracking: true\n }\n },\n series: [\n {\n point: {\n events: {\n click: function(event) {\n var href, j, len1, loc, selected_score;\n selected_score = null;\n for (j = 0, len1 = scores.length; j < len1; j++) {\n score = scores[j];\n if (score.data[0] === this.x && score.data[1] === this.y) {\n selected_score = score;\n break;\n }\n }\n if (!!selected_score && !!selected_score.inbox_id) {\n href = document.location.href.split(\"/\");\n loc = href[0] + \"//\" + href[1] + href[2];\n return document.location.href = loc + \"/ideabox\" + (\"/\" + selected_score.inbox_id) + \"/ideas\" + (\"/\" + selected_score.idea_id + \"/edit\");\n } else {\n href = document.location.href;\n return document.location.href = href.substring(0, href.length - 1) + (\"/\" + selected_score.idea_id + \"/edit\");\n }\n },\n mouseOver: function(event) {\n var j, len1, selected_score;\n selected_score = null;\n for (j = 0, len1 = scores.length; j < len1; j++) {\n score = scores[j];\n if (score.data[0] === this.x && score.data[1] === this.y) {\n selected_score = score;\n break;\n }\n }\n if (!!selected_score) {\n return this.series.name = selected_score.idea_title;\n }\n }\n }\n },\n name: idea_title,\n showInLegend: false,\n data: scores_data\n }\n ]\n });\n }\n};\n\nexport var initBubbleGraph = function () {\n var i,\n max_likes,\n idea_title,\n len,\n myChart,\n score,\n scores,\n scores_data,\n selected_score,\n redirect_scores;\n if ($(\"#bubble-container.all_inbox_ideas\").length > 0) {\n scores = $(\"#bubble-container.all_inbox_ideas\").data(\"scores\");\n redirect_scores = $(\"#bubble-container.all_inbox_ideas\").data(\"redirect\");\n // max_likes= $('#bubble-container.all_inbox_ideas').data('max-likes');\n return (myChart = Highcharts.chart(\"bubble-container\", {\n chart: {\n type: \"packedbubble\",\n height: \"100%\",\n // minHeight:'100%',\n // maxHeight:'100%'\n },\n title: {\n text: \"Top 50 ideas based on number of likes\",\n },\n tooltip: {\n useHTML: true,\n pointFormat: \"{point.name}: {point.value}likes\",\n },\n legend: {\n layout: \"vertical\",\n align: \"left\",\n verticalAlign: \"top\",\n floating: true,\n //backgroundColor: '#FFFFFF'\n },\n plotOptions: {\n packedbubble: {\n minSize: \"30%\",\n maxSize: \"120%\",\n //zMin: 1,\n //zMax: max_likes,\n layoutAlgorithm: {\n splitSeries: false,\n gravitationalConstant: 8,\n },\n dataLabels: {\n enabled: true,\n format: \"{point.name}\",\n filter: {\n property: \"y\",\n operator: \">\",\n value: 0,\n },\n style: {\n color: \"black\",\n textOutline: \"none\",\n textOverflow: \"clip\",\n fontWeight: \"normal\",\n },\n },\n events: {\n cursor: \"pointer\",\n click: function (event) {\n var href, j, len1, loc, selected_score;\n selected_score = null;\n for (j = 0, len1 = redirect_scores.length; j < len1; j++) {\n score = redirect_scores[j];\n if (score.data[0].name === event.point.name) {\n selected_score = score;\n break;\n }\n }\n if (!!selected_score && !!selected_score.board) {\n href = document.location.href.split(\"/\");\n loc = href[0] + \"//\" + href[1] + href[2];\n return (document.location.href =\n loc +\n \"/ideas\" +\n (\"/\" + selected_score.idea_id + \"?board=true\"));\n } else {\n href = document.location.href.split(\"/\");\n loc = href[0] + \"//\" + href[1] + href[2];\n return (document.location.href =\n loc + \"/ideas\" + (\"/\" + selected_score.idea_id));\n }\n },\n },\n },\n },\n series: scores,\n }));\n }\n};\n\nexport var initIdeasGraph = function() {\n var i, idea_title, len, myChart, score, scores, scores_data;\n if ($('#graph-container.all_inbox_ideas').length > 0) {\n scores = $('#graph-container.all_inbox_ideas').data('scores');\n scores_data = [];\n idea_title = \"\";\n for (i = 0, len = scores.length; i < len; i++) {\n score = scores[i];\n scores_data.push(score.data);\n }\n return myChart = Highcharts.chart('graph-container', {\n chart: {\n height: 530,\n backgroundColor: {\n linearGradient: [0, 0, 500, 650],\n stops: [[0, 'rgb(50,205,50)'], [0.4, 'rgb(255, 255, 255)'], [0.65, 'rgb(255, 255, 255)'], [1, 'rgb(255,160,122)']]\n },\n type: 'scatter'\n },\n title: {\n text: ' '\n },\n xAxis: {\n gridLineWidth: 1,\n title: {\n text: 'Investment'\n },\n min: 0,\n max: 10\n },\n yAxis: {\n gridLineWidth: 1,\n title: {\n text: 'Impact'\n },\n min: 0,\n max: 10\n },\n tooltip: {\n pointFormat: 'Impact: {point.y:,.0f}
Investment: {point.x}'\n },\n plotOptions: {\n series: {\n cursor: 'pointer'\n },\n line: {\n dataLabels: {\n enabled: true\n },\n enableMouseTracking: true\n }\n },\n series: [\n {\n point: {\n events: {\n click: function(event) {\n var href, j, len1, loc, selected_score;\n selected_score = null;\n for (j = 0, len1 = scores.length; j < len1; j++) {\n score = scores[j];\n if (score.data[0] === this.x && score.data[1] === this.y) {\n selected_score = score;\n break;\n }\n }\n if (!!selected_score && !!selected_score.board) {\n href = document.location.href.split(\"/\");\n loc = href[0] + \"//\" + href[1] + href[2];\n return document.location.href = loc + \"/ideas\" + (\"/\" + selected_score.idea_id + \"?board=true\");\n } else {\n href = document.location.href.split(\"/\");\n loc = href[0] + \"//\" + href[1] + href[2];\n return document.location.href = loc + \"/ideas\" + (\"/\" + selected_score.idea_id);\n }\n },\n mouseOver: function(event) {\n var j, len1, selected_score;\n selected_score = null;\n for (j = 0, len1 = scores.length; j < len1; j++) {\n score = scores[j];\n if (score.data[0] === this.x && score.data[1] === this.y) {\n selected_score = score;\n break;\n }\n }\n if (!!selected_score) {\n return this.series.name = selected_score.idea_title;\n }\n }\n }\n },\n name: idea_title,\n showInLegend: false,\n data: scores_data\n }\n ]\n });\n }\n};\n\nexport var initTagsGraph = function() {\n var myChart;\n var months= $('#stacked-graph-container').data('month')\n var idea_count= $('#stacked-graph-container').data('idea-tags')\n var project_count= $('#stacked-graph-container').data('project-tags')\n var colors = Highcharts.getOptions().colors.slice(0),\n dark = -0.5;\n colors[1] = Highcharts.Color(colors[0]).brighten(dark).get();\n\n colors[3] = Highcharts.Color(colors[2]).brighten(dark).get();\n if ($('#stacked-graph-container').length > 0){\n return myChart = Highcharts.chart('stacked-graph-container', {\n chart: {\n type: 'column'\n },\n\n colors: colors,\n \n title: {\n text: 'Total tags used per type'\n },\n \n xAxis: {\n type: 'date',\n categories: months\n },\n \n yAxis: {\n allowDecimals: false,\n min: 0,\n title: {\n text: 'Number of Tags'\n }\n },\n \n tooltip: {\n formatter: function () {\n return '' + this.x + '
' +\n this.series.name + ': ' + this.y + '
' +\n 'Total: ' + this.point.stackTotal;\n }\n },\n legend: {\n layout: 'vertical',\n align: 'right',\n verticalAlign: 'middle'\n },\n \n plotOptions: {\n column: {\n stacking: 'normal'\n }\n },\n \n series: [{\n name: 'Ideas',\n data: idea_count,\n stack: 'Idea'\n }, {\n name: 'Projects',\n data: project_count,\n stack: 'project'\n },]\n });\n }\n}\n\nexport var init3dBubbleGraph = function () {\n let scores_data;\n let graph_container_selector = \"#container_3dbubble.graph-container\";\n let graph_container_elem;\n let idea_id;\n let data_type;\n if (\n (graph_container_elem = document.querySelector(graph_container_selector))\n ) {\n scores_data = JSON.parse(graph_container_elem.dataset.scores);\n } else {\n return;\n }\n \n let xtitle = scores_data[0][\"x_axis\"] || \"X-axis\";\n let ytitle = scores_data[0][\"y_axis\"] || \"Y-axis\";\n let ztitle = scores_data[0][\"z_axis\"] || \"Z-axis\";\n console.log(scores_data);\n var standardColors = [\n '#7cb5ec', '#434348', '#90ed7d', '#f7a35c', '#8085e9', '#f15c80',\n '#e4d354', '#2b908f', '#f45b5b', '#91e8e1'\n ];\n\n Highcharts.chart(\"container_3dbubble\", {\n chart: {\n backgroundColor: \"rgba(222,222,222,0)\",\n type: \"bubble\",\n plotBorderWidth: 1, // Add plot border\n plotBorderColor: '#666666', // Set border color\n zoomType: \"xy\",\n },\n title: {\n text: \"\",\n },\n xAxis: {\n gridLineWidth: 1,\n title: {\n text: xtitle,\n },\n min: 0,\n max: 12,\n },\n\n yAxis: {\n startOnTick: false,\n endOnTick: false,\n title: {\n text: ytitle,\n },\n min: 0,\n max: 12,\n },\n tooltip: {\n formatter: function () {\n idea_id = this.point.idea_id;\n data_type = this.point.data_type;\n return `\n \n \n \n \n \n \n \n
\n ${this.point.idea_title}\n
${this.point.x_axis}${this.point.x}
${this.point.y_axis}\n ${this.point.y}\n
${this.point.z_axis}\n ${this.point.z}\n
\n `;\n },\n useHTML: true,\n followPointer: true,\n },\n\n series: [\n {\n name: ztitle,\n data: scores_data,\n marker: {\n fillColor: {\n radialGradient: { cx: 0.4, cy: 0.3, r: 0.7 },\n stops: [\n [0, \"rgba(255,255,255,0.5)\"],\n [\n 1,\n Highcharts.color(standardColors[0])\n .setOpacity(0.5)\n .get(\"rgba\"),\n ],\n ],\n },\n lineColor: null, // Set border to transparent\n lineWidth: 0, // Ensure no border is drawn\n states: {\n hover: {\n lineColor: 'rgba(0,0,0,0)' // Transparent border on hover\n }\n }\n },\n events: {\n click: function () {\n console.log(\"bubble clicked\");\n // perform desired action here\n if (data_type == 'project') {\n window.location.href = `/studio/projects/${idea_id}/edit`;\n } else {\n window.location.href = `/studio/ideas/${idea_id}`;\n }\n },\n },\n },\n ],\n exporting: {\n enabled: true,\n buttons: {\n contextButton: {\n menuItems: ['downloadPNG', 'downloadJPEG', 'downloadPDF', 'downloadSVG']\n }\n }\n }\n });\n};\n\nexport var dashboardIdeaChart = function() {\n if ($('#graph-container').length > 0) {\n const container = document.getElementById('graph-container');\n const idea_count = JSON.parse(container.getAttribute('data-idea-count'));\n const last_30 = JSON.parse(container.getAttribute('data-last-thirty')); // Ensure this is parsed as JSON\n var myChart = Highcharts.chart('graph-container', {\n chart: {\n type: 'column'\n },\n title: {\n text: 'Ideas in time'\n },\n xAxis: {\n categories: last_30\n },\n yAxis: {\n title: {\n text: 'Number of Ideas'\n }\n },\n plotOptions: {\n column: {\n dataLabels: {\n enabled: true\n },\n enableMouseTracking: true,\n colorByPoint: true // Enable color by point\n },\n series: {\n cursor: 'pointer',\n point: {\n events: {\n click: function(event) {\n var href, loc;\n href = document.location.href.split(\"/\");\n loc = href[0] + \"//\" + href[1] + href[2];\n return document.location.href = loc + \"/studio/ideas\";\n }\n }\n }\n }\n },\n colors: Highcharts.getOptions().colors,\n series: [{\n showInLegend: false,\n name: '',\n data: idea_count\n }]\n });\n }\n\n if ($('#graph-container-projects').length > 0) {\n const container = document.getElementById('graph-container-projects');\n const project_count = JSON.parse(container.getAttribute('data-project-count'));\n const last_30 = JSON.parse(container.getAttribute('data-last-thirty')); // Ensure this is parsed as JSON\n var myChart = Highcharts.chart('graph-container-projects', {\n chart: {\n type: 'column'\n },\n title: {\n text: 'Projects in time'\n },\n xAxis: {\n categories: last_30\n },\n yAxis: {\n title: {\n text: 'Number of Projects'\n }\n },\n plotOptions: {\n column: {\n dataLabels: {\n enabled: true\n },\n enableMouseTracking: true,\n colorByPoint: true // Enable color by point\n },\n series: {\n point: {\n events: {\n click: function(event) {\n var href, loc;\n href = document.location.href.split(\"/\");\n loc = href[0] + \"//\" + href[1] + href[2];\n return document.location.href = loc + \"/studio/projects\";\n }\n }\n }\n }\n },\n colors: Highcharts.getOptions().colors,\n series: [{\n showInLegend: false,\n name: '',\n data: project_count\n }]\n });\n }\n \n}\n\n\nexport var initCharts = function() {\n var categories, chart, data, label, pie_chart, top_agents, values;\n\n if ($('#top-projects').length > 0) {\n categories = $('#top-projects').data('projects');\n label = 'Progress';\n values = $('#top-projects').data('project-progress');\n top_agents = Highcharts.chart('top-projects', {\n chart: {\n type: 'bar',\n height: 300\n },\n title: {\n text: 'Top 5 Projects by Progress',\n x: -50\n },\n xAxis: {\n categories: categories\n },\n yAxis: {\n visible: false\n },\n legend: {\n reversed: true\n },\n tooltip: {\n headerFormat: '',\n pointFormat: '{point.full_name}
'\n },\n plotOptions: {\n series: {\n pointWidth: 25,\n point: {\n events: {\n click: function() {\n window.open(this.options.url, '_blank');\n }\n }\n },\n stacking: 'normal',\n colorByPoint: true,\n dataLabels: {\n enabled: true,\n color: '#FFFFFF'\n }\n }\n },\n series: [\n {\n name: label,\n data: values\n }\n ]\n });\n }\n if ($('#top-funnels').length > 0) {\n categories = $('#top-funnels').data('projects');\n label = 'Progress';\n values = $('#top-funnels').data('project-progress');\n top_agents = Highcharts.chart('top-funnels', {\n chart: {\n type: 'bar',\n height: 290\n },\n title: {\n text: 'Top 5 Funnels',\n x: -50\n },\n xAxis: {\n categories: categories\n },\n yAxis: {\n visible: false\n },\n legend: {\n reversed: true\n },\n tooltip: {\n headerFormat: '',\n pointFormat: '{point.full_name}
'\n },\n plotOptions: {\n series: {\n pointWidth: 25,\n point: {\n events: {\n click: function() {\n window.open(this.options.url, '_blank');\n }\n }\n },\n stacking: 'normal',\n colorByPoint: true,\n dataLabels: {\n enabled: true,\n color: '#FFFFFF'\n }\n }\n },\n series: [\n {\n name: label,\n data: values\n }\n ]\n });\n }\n if ($('#top-missions').length > 0) {\n categories = $('#top-missions').data('projects');\n label = 'Progress';\n values = $('#top-missions').data('project-progress');\n top_agents = Highcharts.chart('top-missions', {\n chart: {\n type: 'bar',\n height: 300\n },\n title: {\n text: 'Top 5 Missions',\n x: -50\n },\n xAxis: {\n categories: categories\n },\n yAxis: {\n visible: false\n },\n legend: {\n reversed: true\n },\n tooltip: {\n headerFormat: '',\n pointFormat: '{point.full_name}
'\n },\n plotOptions: {\n series: {\n pointWidth: 25,\n point: {\n events: {\n click: function() {\n window.open(this.options.url, '_blank');\n }\n }\n },\n stacking: 'normal',\n colorByPoint: true,\n dataLabels: {\n enabled: true,\n color: '#FFFFFF'\n }\n }\n },\n series: [\n {\n name: label,\n data: values\n }\n ]\n });\n }\n if ($('#top-ideations').length > 0) {\n categories = $('#top-ideations').data('missions');\n label = 'Ideas Generated';\n values = $('#top-ideations').data('ideas-count');\n top_agents = Highcharts.chart('top-ideations', {\n chart: {\n type: 'bar',\n height: 230\n },\n xAxis: {\n categories: categories\n },\n yAxis: {\n visible: false\n },\n legend: {\n reversed: true\n },\n tooltip: {\n headerFormat: '',\n pointFormat: '{point.full_name}
'\n },\n plotOptions: {\n series: {\n pointWidth: 25,\n point: {\n events: {\n click: function() {\n window.open(this.options.url, '_blank');\n }\n }\n },\n stacking: 'normal',\n colorByPoint: true,\n dataLabels: {\n enabled: true,\n color: '#FFFFFF'\n }\n }\n },\n series: [\n {\n name: label,\n data: values\n }\n ]\n });\n }\n if ($('#top-inboxes').length > 0) {\n categories = $('#top-inboxes').data('inboxes');\n label = 'Ideas Generated';\n values = $('#top-inboxes').data('ideas-count');\n top_agents = Highcharts.chart('top-inboxes', {\n chart: {\n type: 'bar',\n height: 230\n },\n xAxis: {\n categories: categories\n },\n yAxis: {\n visible: false\n },\n legend: {\n reversed: true\n },\n tooltip: {\n headerFormat: '',\n pointFormat: '{point.full_name}
'\n },\n plotOptions: {\n series: {\n pointWidth: 25,\n point: {\n events: {\n click: function() {\n window.open(this.options.url, '_blank');\n }\n }\n },\n stacking: 'normal',\n colorByPoint: true,\n dataLabels: {\n enabled: true,\n color: '#FFFFFF'\n }\n }\n },\n series: [\n {\n name: label,\n data: values\n }\n ]\n });\n }\n if ($('#top-agents-chart').length > 0) {\n categories = $('#top-agents-chart').data('categories');\n label = 'Ideas Generated';\n values = $('#top-agents-chart').data('ideas-count');\n top_agents = Highcharts.chart('top-agents-chart', {\n chart: {\n type: 'bar'\n },\n xAxis: {\n categories: categories\n },\n yAxis: {\n min: 0,\n title: {\n text: label\n }\n },\n legend: {\n reversed: true\n },\n plotOptions: {\n series: {\n stacking: 'normal',\n colorByPoint: true\n }\n },\n series: [\n {\n name: label,\n data: values\n }\n ]\n });\n }\n if ($('#top-xp-agents-chart').length > 0) {\n categories = $('#top-xp-agents-chart').data('categories');\n label = 'XP Points';\n values = $('#top-xp-agents-chart').data('xp-count');\n top_agents = Highcharts.chart('top-xp-agents-chart', {\n chart: {\n type: 'bar'\n },\n xAxis: {\n categories: categories\n },\n tooltip: {\n enabled: false\n },\n yAxis: {\n visible: false\n },\n legend: {\n reversed: true\n },\n plotOptions: {\n series: {\n pointWidth: 25,\n stacking: 'normal',\n colorByPoint: true,\n dataLabels: {\n enabled: true,\n color: '#FFFFFF'\n }\n }\n },\n series: [\n {\n name: label,\n data: values\n }\n ]\n });\n }\n if ($('#top-xp-users-chart').length > 0) {\n categories = $('#top-xp-users-chart').data('categories');\n label = 'XP Points';\n values = $('#top-xp-users-chart').data('xp-count');\n top_agents = Highcharts.chart('top-xp-users-chart', {\n chart: {\n type: 'bar'\n },\n xAxis: {\n categories: categories\n },\n tooltip: {\n enabled: false\n },\n yAxis: {\n visible: false\n },\n legend: {\n reversed: true\n },\n plotOptions: {\n series: {\n pointWidth: 25,\n stacking: 'normal',\n colorByPoint: true,\n dataLabels: {\n enabled: true,\n color: '#FFFFFF'\n }\n }\n },\n series: [\n {\n name: label,\n data: values\n }\n ]\n });\n }\n if ($('#column-with-drill-chart').length > 0) {\n Highcharts.chart('column-with-drill-chart', {\n chart: {\n type: 'column'\n },\n accessibility: {\n announceNewData: {\n enabled: true\n }\n },\n xAxis: {\n type: 'category'\n },\n yAxis: {\n title: {\n text: 'Total percent market share'\n }\n },\n legend: {\n enabled: false\n },\n plotOptions: {\n series: {\n borderWidth: 0,\n dataLabels: {\n enabled: true,\n format: '{point.y:.1f}%'\n }\n }\n },\n tooltip: {\n headerFormat: '{series.name}
',\n pointFormat: '{point.name}: {point.y:.2f}% of total
'\n },\n series: [\n {\n name: 'Browsers',\n colorByPoint: true,\n data: [\n {\n name: 'Chrome',\n y: 62.74,\n drilldown: 'Chrome'\n }, {\n name: 'Firefox',\n y: 10.57,\n drilldown: 'Firefox'\n }, {\n name: 'Internet Explorer',\n y: 7.23,\n drilldown: 'Internet Explorer'\n }, {\n name: 'Safari',\n y: 5.58,\n drilldown: 'Safari'\n }, {\n name: 'Edge',\n y: 4.02,\n drilldown: 'Edge'\n }, {\n name: 'Opera',\n y: 1.92,\n drilldown: 'Opera'\n }, {\n name: 'Other',\n y: 7.62,\n drilldown: null\n }\n ]\n }\n ],\n drilldown: {\n series: [\n {\n name: 'Chrome',\n id: 'Chrome',\n data: [['v65.0', 0.1], ['v64.0', 1.3], ['v63.0', 53.02], ['v62.0', 1.4], ['v61.0', 0.88], ['v60.0', 0.56], ['v59.0', 0.45], ['v58.0', 0.49], ['v57.0', 0.32], ['v56.0', 0.29], ['v55.0', 0.79], ['v54.0', 0.18], ['v51.0', 0.13], ['v49.0', 2.16], ['v48.0', 0.13], ['v47.0', 0.11], ['v43.0', 0.17], ['v29.0', 0.26]]\n }, {\n name: 'Firefox',\n id: 'Firefox',\n data: [['v58.0', 1.02], ['v57.0', 7.36], ['v56.0', 0.35], ['v55.0', 0.11], ['v54.0', 0.1], ['v52.0', 0.95], ['v51.0', 0.15], ['v50.0', 0.1], ['v48.0', 0.31], ['v47.0', 0.12]]\n }, {\n name: 'Internet Explorer',\n id: 'Internet Explorer',\n data: [['v11.0', 6.2], ['v10.0', 0.29], ['v9.0', 0.27], ['v8.0', 0.47]]\n }, {\n name: 'Safari',\n id: 'Safari',\n data: [['v11.0', 3.39], ['v10.1', 0.96], ['v10.0', 0.36], ['v9.1', 0.54], ['v9.0', 0.13], ['v5.1', 0.2]]\n }, {\n name: 'Edge',\n id: 'Edge',\n data: [['v16', 2.6], ['v15', 0.92], ['v14', 0.4], ['v13', 0.1]]\n }, {\n name: 'Opera',\n id: 'Opera',\n data: [['v50.0', 0.96], ['v49.0', 0.82], ['v12.1', 0.14]]\n }\n ]\n }\n });\n }\n if ($('#pie-chart-container').length > 0) {\n data = $('#pie-chart-container').data('pie-chart-data');\n pie_chart = Highcharts.chart('pie-chart-container', {\n chart: {\n plotBackgroundColor: null,\n plotBorderWidth: null,\n plotShadow: false,\n type: 'pie',\n width: 500\n },\n title: {\n text: 'Projects per departments'\n },\n tooltip: {\n pointFormat: '{series.name}: {point.y}'\n },\n accessibility: {\n point: {\n valueSuffix: '%'\n }\n },\n plotOptions: {\n pie: {\n size: 200,\n showInLegend: true,\n allowPointSelect: true,\n cursor: 'pointer',\n dataLabels: {\n enabled: true,\n format: '{point.name}: {point.y}'\n }\n }\n },\n series: [\n {\n name: 'Brands',\n colorByPoint: true,\n data: data\n }\n ]\n });\n }\n if ($('#funnel-container').length > 0) {\n data = $('#funnel-container').data('funnel-chart-data');\n return chart = Highcharts.chart('funnel-container', {\n chart: {\n type: 'funnel',\n height: 280\n },\n title: {\n text: 'Innovation Funnel',\n x: -50\n },\n plotOptions: {\n series: {\n dataLabels: {\n enabled: true,\n format: '{point.name} ({point.y:,.0f})',\n softConnector: true\n },\n center: ['40%', '50%'],\n width: '80%',\n events: {\n click: function (event) {\n window.open(event.point.series.userOptions.data[event.point.x][2], '_blank');\n }\n }\n }\n },\n legend: {\n enabled: false\n },\n series: [\n {\n name: 'Total records',\n data: data\n }\n ],\n responsive: {\n rules: [\n {\n condition: {\n maxWidth: 500\n },\n chartOptions: {\n plotOptions: {\n series: {\n dataLabels: {\n inside: true\n },\n center: ['50%', '50%'],\n width: '100%'\n }\n }\n }\n }\n ]\n }\n });\n }\n};\n\n// export var taskCharts = function() {\n// if(document.getElementById('taskganttcontainer')){\n// const container = document.getElementById('taskganttcontainer');\n// const taskData = JSON.parse(container.getAttribute('data-task-data'));\n\n// // Helper function to transform the task data\n// function transformTaskData(data) {\n// const today = Math.floor(Date.now() / (24 * 36e5)) * (24 * 36e5); // today's date at midnight\n// return data.map(item => {\n// const transformedItem = {\n// name: item.name,\n// id: item.id.toString(),\n// owner: item.owner,\n// };\n// if (item.start_date){\n// transformedItem.start = new Date(item.start_date).getTime();\n// transformedItem.end = new Date(item.end).getTime();\n// }\n// if (item.end_date) {\n// transformedItem.start = new Date(today).getTime();\n// transformedItem.end = new Date(item.end_date).getTime(); // assuming duration is 2 days if end is not provided\n// }\n// if (item.parent) {\n// transformedItem.parent = item.parent.toString();\n// }\n// return transformedItem;\n// });\n// }\n\n// const transformedData = transformTaskData(taskData);\n// const day = 24 * 36e5; // milliseconds in a day\n// const today = Math.floor(Date.now() / day) * day; // today's date at midnight\n\n\n// const options = {\n// chart: {\n// plotBackgroundColor: 'rgba(128,128,128,0.02)',\n// plotBorderColor: 'rgba(128,128,128,0.1)',\n// plotBorderWidth: 1\n// },\n// plotOptions: {\n// series: {\n// // borderRadius: '100%',\n// connectors: {\n// dashStyle: 'ShortDot',\n// lineWidth: 6,\n// radius: 8,\n// startMarker: {\n// enabled: false\n// }\n// },\n// dataLabels: [{\n// enabled: true,\n// align: 'left',\n// format: '{point.name}',\n// padding: 10,\n// style: {\n// fontWeight: 'normal',\n// textOutline: 'none'\n// }\n// }, {\n// enabled: true,\n// align: 'right',\n// format: '{#if point.completed}{(multiply point.completed.amount 100):.0f}%{/if}',\n// padding: 10,\n// style: {\n// fontWeight: 'normal',\n// textOutline: 'none',\n// opacity: 0.6\n// }\n// }]\n// }\n// },\n// series: [{\n// name: 'Project Tasks',\n// data: transformedData\n// }],\n// tooltip: {\n// pointFormat: '{point.name}
' +\n// '{point.start:%e %b} → {point.end:%e %b}
' +\n// 'Owner: {#if point.owner}{point.owner}'\n// },\n// title: {\n// text: 'Gantt Project Management'\n// },\n// xAxis: [{\n// currentDateIndicator: {\n// color: '#2caffe',\n// dashStyle: 'ShortDot',\n// width: 2,\n// label: {\n// format: ''\n// }\n// },\n// dateTimeLabelFormats: {\n// day: '%e
%a'\n// },\n// grid: {\n// borderWidth: 0\n// },\n// gridLineWidth: 1,\n// min: today - 3 * (24 * 36e5),\n// max: today + 18 * (24 * 36e5),\n// custom: {\n// today,\n// weekendPlotBands: true\n// }\n// }],\n// yAxis: {\n// grid: {\n// borderWidth: 0\n// },\n// gridLineWidth: 0,\n// labels: {\n// symbol: {\n// width: 8,\n// height: 6,\n// x: -4,\n// y: -2\n// }\n// },\n// staticScale: 30\n// },\n// accessibility: {\n// keyboardNavigation: {\n// seriesNavigation: {\n// mode: 'serialize'\n// }\n// },\n// point: {\n// descriptionFormatter: function (point) {\n// const completedValue = point.completed ?\n// point.completed.amount || point.completed : null,\n// completed = completedValue ?\n// ' Task ' + Math.round(completedValue * 1000) / 10 +\n// '% completed.' :\n// '',\n// dependency = point.dependency &&\n// point.series.chart.get(point.dependency).name,\n// dependsOn = dependency ?\n// ' Depends on ' + dependency + '.' : '';\n\n// return Highcharts.format(\n// point.milestone ?\n// '{point.yCategory}. Milestone at {point.x:%Y-%m-%d}. ' +\n// 'Owner: {point.owner}.{dependsOn}' :\n// '{point.yCategory}.{completed} Start ' +\n// '{point.x:%Y-%m-%d}, end {point.x2:%Y-%m-%d}. Owner: ' +\n// '{point.owner}.{dependsOn}',\n// { point, completed, dependsOn }\n// );\n// }\n// }\n// },\n// lang: {\n// accessibility: {\n// axis: {\n// xAxisDescriptionPlural: 'The chart has a two-part X axis ' +\n// 'showing time in both week numbers and days.'\n// }\n// }\n// }\n// };\n\n// // Plug-in to render plot bands for the weekends\n// Highcharts.addEvent(Highcharts.Axis, 'foundExtremes', e => {\n// if (e.target.options.custom && e.target.options.custom.weekendPlotBands) {\n// const axis = e.target,\n// chart = axis.chart,\n// day = 24 * 36e5,\n// isWeekend = t => /[06]/.test(chart.time.dateFormat('%w', t)),\n// plotBands = [];\n\n// let inWeekend = false;\n\n// for (\n// let x = Math.floor(axis.min / day) * day;\n// x <= Math.ceil(axis.max / day) * day;\n// x += day\n// ) {\n// const last = plotBands.at(-1);\n// if (isWeekend(x) && !inWeekend) {\n// plotBands.push({\n// from: x,\n// color: {\n// pattern: {\n// path: 'M 0 10 L 10 0 M -1 1 L 1 -1 M 9 11 L 11 9',\n// width: 10,\n// height: 10,\n// color: 'rgba(128,128,128,0.15)'\n// }\n// }\n// });\n// inWeekend = true;\n// }\n\n// if (!isWeekend(x) && inWeekend && last) {\n// last.to = x;\n// inWeekend = false;\n// }\n// }\n// axis.options.plotBands = plotBands;\n// }\n// });\n\n// Highcharts.ganttChart('taskganttcontainer', options);\n\n\n// }\n// };\n\n\n\nexport var taskCharts = function() {\n if(document.getElementById('taskganttcontainer')){\n const container = document.getElementById('taskganttcontainer');\n const taskData = JSON.parse(container.getAttribute('data-task-data'));\n const objectTitle = container.getAttribute('data-object-name')\n const chartHeight = container.getAttribute('data-chart-height')\n\n // Helper function to transform the task data\n function transformTaskData(data) {\n const today = Math.floor(Date.now() / (24 * 36e5)) * (24 * 36e5); // today's date at midnight\n return data.map(item => {\n const transformedItem = {\n name: item.name,\n id: item.id.toString(),\n owner: item.owner,\n due_date: new Date(item.due_date).getTime()\n };\n if (item.start_date) {\n let startDate = new Date(item.start_date);\n let endDate = new Date(item.end_date);\n \n // Set the start time to the beginning of the day in UTC (00:00:00)\n startDate.setUTCHours(0, 0, 0, 0);\n \n // Set the end time to the end of the day in UTC (23:59:59.999)\n endDate.setUTCHours(23, 59, 59, 999);\n \n transformedItem.start = startDate.getTime();\n transformedItem.end = endDate.getTime();\n }\n if (item.status){\n transformedItem.status = item.status;\n transformedItem.phase = item.phase;\n }\n if (item.parent) {\n transformedItem.parent = item.parent.toString();\n }\n return transformedItem;\n });\n }\n\n const transformedData = transformTaskData(taskData);\n const day = 24 * 36e5; // milliseconds in a day\n\n // Determine the start date of the first task\n const firstTaskStartDate = transformedData.reduce((minDate, task) => {\n return task.start < minDate ? task.start : minDate;\n }, transformedData[0].start);\n\n const lastTaskStartDate = transformedData.reduce((maxDate, task) => {\n return task.start > maxDate ? task.start : maxDate;\n }, transformedData[0].start);\n \n\n // Calculate 6 days before the start date of the first task\n const minDate = firstTaskStartDate - 3 * day;\n const maxDate = lastTaskStartDate + 3 * day;\n\n const options = {\n chart: {\n plotBackgroundColor: 'rgba(128,128,128,0.02)',\n plotBorderColor: 'rgba(128,128,128,0.1)',\n plotBorderWidth: 1,\n height: chartHeight\n },\n plotOptions: {\n series: {\n pointWidth: 25,\n // borderRadius: '50%',\n connectors: {\n dashStyle: 'ShortDot',\n lineWidth: 2,\n radius: 5,\n startMarker: {\n enabled: false\n }\n },\n dataLabels: [{\n enabled: true,\n align: 'left',\n format: '{point.name}',\n padding: 10,\n style: {\n fontWeight: 'normal',\n textOutline: 'none'\n }\n }, {\n enabled: true,\n align: 'right',\n format: '{#if point.completed}{(multiply point.completed.amount 100):.0f}%{/if}',\n padding: 10,\n style: {\n fontWeight: 'normal',\n textOutline: 'none',\n opacity: 0.6\n }\n }],\n point: {\n events: {\n click: function() {\n const task_id = this.id;\n $.ajax({\n type: \"GET\",\n url: \"/tasks/edit_task_modal\",\n data: {\n id: task_id,\n },\n success: function (data) {\n admin_ready();\n },\n });\n }\n }\n }\n }\n },\n series: [{\n name: objectTitle,\n data: transformedData\n }],\n tooltip: {\n pointFormat: '{point.name}
' +\n 'Due Date: {point.due_date:%e %b}
' +\n 'Owner: {#if point.owner}{point.owner}
' +\n 'Status: {point.status:%e %b}
' +\n 'Phase: {point.phase:%e %b}
'\n },\n title: {\n text: `Project: ${objectTitle}`\n },\n xAxis: [{\n currentDateIndicator: {\n color: '#2caffe',\n dashStyle: 'ShortDot',\n width: 2,\n label: {\n format: ''\n }\n },\n dateTimeLabelFormats: {\n day: '%e
%a'\n },\n grid: {\n borderWidth: 0\n },\n gridLineWidth: 1,\n min: minDate,\n max: firstTaskStartDate + 24 * 21 * day, // Show 21 days after the first task start date\n custom: {\n today: new Date().getTime(),\n weekendPlotBands: true\n }\n }],\n yAxis: {\n grid: {\n borderWidth: 0\n },\n gridLineWidth: 0,\n labels: {\n symbol: {\n width: 8,\n height: 6,\n x: -4,\n y: -2\n }\n },\n staticScale: 30\n },\n accessibility: {\n keyboardNavigation: {\n seriesNavigation: {\n mode: 'serialize'\n }\n },\n point: {\n descriptionFormatter: function (point) {\n const completedValue = point.completed ?\n point.completed.amount || point.completed : null,\n completed = completedValue ?\n ' Task ' + Math.round(completedValue * 1000) / 10 +\n '% completed.' :\n '',\n dependency = point.dependency &&\n point.series.chart.get(point.dependency).name,\n dependsOn = dependency ?\n ' Depends on ' + dependency + '.' : '';\n\n return Highcharts.format(\n point.milestone ?\n '{point.yCategory}. Milestone at {point.x:%Y-%m-%d}. ' +\n 'Owner: {point.owner}.{dependsOn}' :\n '{point.yCategory}.{completed} Start ' +\n '{point.x:%Y-%m-%d}, end {point.x2:%Y-%m-%d}. Owner: ' +\n '{point.owner}.{dependsOn}',\n { point, completed, dependsOn }\n );\n }\n }\n },\n lang: {\n accessibility: {\n axis: {\n xAxisDescriptionPlural: 'The chart has a two-part X axis ' +\n 'showing time in both week numbers and days.'\n }\n }\n }\n };\n\n // Plug-in to render plot bands for the weekends\n Highcharts.addEvent(Highcharts.Axis, 'foundExtremes', e => {\n if (e.target.options.custom && e.target.options.custom.weekendPlotBands) {\n const axis = e.target,\n chart = axis.chart,\n day = 24 * 36e5,\n isWeekend = t => /[06]/.test(chart.time.dateFormat('%w', t)),\n plotBands = [];\n\n let inWeekend = false;\n\n for (\n let x = Math.floor(axis.min / day) * day;\n x <= Math.ceil(axis.max / day) * day;\n x += day\n ) {\n const last = plotBands.at(-1);\n if (isWeekend(x) && !inWeekend) {\n plotBands.push({\n from: x,\n color: {\n pattern: {\n path: 'M 0 10 L 10 0 M -1 1 L 1 -1 M 9 11 L 11 9',\n width: 10,\n height: 20,\n color: 'rgba(128,128,128,0.15)'\n }\n }\n });\n inWeekend = true;\n }\n\n if (!isWeekend(x) && inWeekend && last) {\n last.to = x;\n inWeekend = false;\n }\n }\n axis.options.plotBands = plotBands;\n }\n });\n\n const chart = Highcharts.ganttChart('taskganttcontainer', options)\n // Use setExtremes to adjust the view to show 6 days prior to the first task start date\n chart.xAxis[0].setExtremes(minDate, maxDate); // Adjust the range as needed\n }\n};\n","import Tribute from 'tributejs'\nwindow.addEventListener('load', () => {\n var iframe = document.getElementsByClassName('tox-edit-area__iframe');\n var tribute = new Tribute({\n values: function (search, cb) {\n getUsernames(search, users => cb(users))\n },\n selectClass: 'element-hover',\n itemClass: 'main_tribute_li',\n menuItemTemplate: function (item) {\n return '' +' ' + ' @'+ item.original.key + '';\n },\n\n });\n var trib = $(\".tox-edit-area__iframe\").contents().find(\"body\")\n if (trib){\n trib= trib[0]\n if (trib && trib.childNodes.length > 0){\n tribute.attach(trib.childNodes[0]);\n }\n }\n function getUsernames(query, callback) {\n if (query.length < 1) {\n return false;\n } else {\n return $.getJSON('/mentions', {\n q: query,\n inbox: $(\".mention\").data(\"mission-id\")\n }, function(data) {\n if (data){\n callback(data);\n } else {\n callback([]);\n }\n });\n }\n }\n});","/*\n * decaffeinate suggestions:\n * DS102: Remove unnecessary code created because of implicit returns\n * DS205: Consider reworking code to avoid use of IIFEs\n * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md\n */\nvar $ = jQuery;\nimport 'materialize-css/dist/js/materialize';\nimport 'webpack-jquery-ui/draggable';\nimport 'kbw-countdown/dist/js/jquery.plugin';\nimport 'kbw-countdown/dist/js/jquery.countdown';\n\n$(function() {\n\tvar validateEmail;\n\t$(\".pass_field\").keyup(\n\t\tfunction() {\n\t\t\tif(!!$(\".pass_field\").val() && ($(\".pass_field\").val().length < 6)) {\n\t\t\t\t$(\".tick-pass-1\").addClass(\"hide\");\n\t\t\t\treturn $(\".clear-pass-1\").removeClass(\"hide\");\n\t\t\t} else {\n\t\t\t\t$(\".tick-pass-1\").removeClass(\"hide\");\n\t\t\t\treturn $(\".clear-pass-1\").addClass(\"hide\");\n\t\t\t}\n\t});\n\n\t$(\".pass_confirmation\").keyup(\n\t\tfunction() {\n\t\t\tif($(\".pass_field\").val() === $(\".pass_confirmation\").val()) {\n\t\t\t\t$(\".tick-pass-2\").removeClass(\"hide\");\n\t\t\t\treturn $(\".clear-pass-2\").addClass(\"hide\");\n\t\t\t} else {\n\t\t\t\t$(\".tick-pass-2\").addClass(\"hide\");\n\t\t\t\treturn $(\".clear-pass-2\").removeClass(\"hide\");\n\t\t\t}\n\t});\n\n\t$(\".signin-pass\").keyup(\n\t\tfunction() {\n\t\t\tif($(\".signin-pass\").val().length < 6) {\n\t\t\t\t$(\".tick-pass-3\").addClass(\"hide\");\n\t\t\t\treturn $(\".clear-pass-3\").removeClass(\"hide\");\n\t\t\t} else {\n\t\t\t\t$(\".tick-pass-3\").removeClass(\"hide\");\n\t\t\t\treturn $(\".clear-pass-3\").addClass(\"hide\");\n\t\t\t}\n\t});\n\n\twindow.on_input = function(input){\n\t\tvar start = input.selectionStart;\n\t\tvar end = input.selectionEnd;\n\n\t\tinput.value = input.value.toLowerCase();\n\t\tif(input.type === 'email') return\n\t\tinput.setSelectionRange(start, end);\n\t};\n\n\t$(\"#Email\").on('input', function() {\n\t\treturn on_input($(this)[0]);\n\t\t});\n\n\t$(\"#add-user\").on(\"click\", function() {\n\t\tvar name = $(\"#Name\").val();\n\t\tvar email= $(\"#Email\").val();\n\t\temail= email.toLowerCase();\n\t\tif (name && email) {\n\t\t\tvar length;\n\t\t\tconsole.log(name+\" \"+email);\n\t\t\t$(\"#Name\").val(\"\");\n\t\t\t$(\"#Email\").val(\"\");\n\n\t\t\tvar id = (length = $(\"#users-table tr\").length);\n\t\t\tvar row = $(\"#users-table\").find('tbody')[0].insertRow(0);\n\t\t\tvar cell1 = row.insertCell(0);\n\t\t\tvar cell2 = row.insertCell(1);\n\t\t\tvar cell3 = row.insertCell(2);\n\t\t\tcell1.innerHTML = \"
\");\n\t\t\tcell2.innerHTML = \"
\");\n\n\t\t\t// elems = []\n\t\t\t// elems.push \"\"\n\t\t\t// elems.push \"\"\n\t\t\t// elems.push \"\"\n\n\n\t\t\tcell3.innerHTML = \"\"\n );\n\t\t\tif ($('select').length > 0 && $.fn.material_select) {\n\t\t\t\t$('select').material_select();\n\t\t\t }\n\t\t\t$('#modal-add-user').modal('close');\n\t\t} else {\n\t\t\t$('.toast').remove();\n\t\t\tMaterialize.toast(\"Please enter Name and Email.\", 2000);\n\t\t}\n\n return $('.save-csv-list').off;\n\t});\n\t$('.save-csv-list').on('click', function() {\n return $('#add-invite-form').submit();\n });\n\n\t$(\"#add-users-csv\").change(function() {\t \n\t\tvar file = $('#add-users-csv')[0].files[0];\n\t\tif (!!file) {\n\t\t\tvar reader = new FileReader();\n\t\t\treader.readAsText(file);\n\t\t\treturn reader.onload = function(ee) {\n\t\t\t\tvar imported_data = Papa.parse(ee.target.result, {}).data;\n\t\t\t\tvar data = 1;\n\t\t\t\tvar id = 0;\n\t\t\t\treturn (function() {\n\t\t\t\t\tvar result = [];\n\t\t\t\t\twhile(data) {\n\t\t\t\t\t\tdata = imported_data.shift();\n\t\t\t\t\t\n\t\t\t\t\t\tif (validateEmail(data[0]) || validateEmail(data[1])) {\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar name = data[0];\n\t\t\t\t\t\t\tvar email = data[1].toLowerCase();\n\t\t\t\t\t\t\tid = id + 1;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar elems = $('#add-invite-form');\n\t\t\t\t\t\t\telems.append(\"\"));\n\t\t\t\t\t\t\telems.append(\"\"));\n\t\t\t\t\t\t\tresult.push(elems.append(\"\")));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresult.push(undefined);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn result;\n\t\t\t\t})();\n\t\t\t};\n\t\t}\n\t});\n\n\treturn validateEmail = function validateEmail(email) {\n\t\tvar re = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n\t\treturn re.test(email);\n\t};\n});\n","var next_prev_event_register;\n\nimport $ from 'jquery';\n\nimport 'materialize-css/dist/js/materialize';\n\nrequire('webpack-jquery-ui/sortable');\n\nimport 'kbw-countdown/dist/js/jquery.plugin';\n\nimport 'kbw-countdown/dist/js/jquery.countdown';\n\nnext_prev_event_register = function() {\n $(\".next-pg\").on(\"click\", function() {\n var next_element;\n next_element = $(this);\n return $.ajax({\n url: next_element.data(\"view-url\"),\n data: {\n sequence_number: next_element.data(\"id\"),\n display: next_element.data(\"display\")\n },\n success: function(data) {\n $(\".info-content\").html(data);\n $('.info-content').find('a.modal-close').click(function() {\n return $('.info-content').siblings('button.modal-close').click();\n });\n next_prev_event_register();\n return rounds_ready();\n },\n error: function(data) {\n return $('#open-briefing.modal').modal('close');\n }\n });\n });\n return $(\".prev-pg\").on(\"click\", function() {\n var prev_element;\n prev_element = $(this);\n return $.ajax({\n url: prev_element.data(\"view-url\"),\n data: {\n sequence_number: prev_element.data(\"id\"),\n display: prev_element.data(\"display\")\n },\n success: function(data) {\n $(\".info-content\").html(data);\n $('.info-content').find('a.modal-close').click(function() {\n return $('.info-content').siblings('button.modal-close').click();\n });\n next_prev_event_register();\n return rounds_ready();\n },\n error: function(data) {\n return $('#open-briefing.modal').modal('close');\n }\n });\n });\n};\n\n$(function() {\n var drop_element, start_timers;\n // $(\".modal-close\").click(function() {\n // return $(this).parents('.modal.open').modal('close');\n // });\n $(\".modal-briefing\").click(function() {\n var current_seq_number, element, view_url;\n current_seq_number = $(document).find('#round_page_sequence_number').val();\n view_url = $(document).find('.fetch-page-details').first().data(\"view-url\");\n element = $(this);\n return $.ajax({\n url: view_url,\n data: {\n sequence_number: current_seq_number,\n page_click: true\n },\n success: function(result) {\n var confirmation_variable;\n if (result.status !== true) {\n $('.brief-page-update').removeClass('active-page');\n $('.brief-page-update').first().addClass('active-page');\n return element.parents('.modal.open').modal('close');\n } else {\n confirmation_variable = confirm(\"Do you want to leave this briefing page without saving ?\");\n if (confirmation_variable === true) {\n return element.parents('.modal.open').modal('close');\n }\n }\n }\n });\n });\n start_timers = function() {\n return $('.time-disposeable').each(function() {\n var diff, newtime;\n newtime = new Date(parseFloat($(this).data('time')));\n diff = (newtime - new Date()) / 1000;\n if (diff >= 259200) {\n return $(this).countdown({\n until: diff,\n compact: true,\n layout: '{dn}d {hnn}h {mnn}m {desc}',\n format: 'dHM',\n description: ''\n });\n } else {\n return $(this).countdown({\n until: diff,\n compact: true,\n layout: '{hnn}h {mnn}m {snn}s {desc}',\n format: 'HMS',\n description: ''\n });\n }\n });\n };\n $('.sort-abel-content').sortable({\n start: function(event, ui) {\n ui.item.data(\"startindex\", ui.item.index());\n return console.log(ui.item.index());\n },\n update: function(event, ui) {\n var new_index, old_index, replaced_id, replaced_object, replacing_id, replacing_object;\n new_index = ui.item.index();\n old_index = ui.item.data(\"startindex\");\n replacing_object = $(this).find('.round-summary').get(new_index);\n replaced_object = new_index > 0 ? $(this).find('.round-summary').get(new_index - 1) : null;\n replacing_id = $(replacing_object).data('id');\n replaced_id = $(replaced_object).data('id');\n console.log(replacing_id + ', ' + replaced_id);\n return $.ajax({\n type: 'POST',\n url: $(replacing_object).data('move-url'),\n data: {\n move_params: {\n replacing_id: replacing_id,\n replaced_id: replaced_id,\n new_index: new_index,\n old_index: old_index\n }\n },\n success: function() {}\n });\n }\n });\n $('.sort-abel-content').disableSelection();\n $('.droppable').each(function() {\n var element;\n element = $(this);\n return element.droppable({\n accept: element.data(\"draggable\"),\n classes: {\n \"ui-droppable-active\": element.data('active-class')\n },\n drop: function(event, ui) {\n return drop_element($(this), event, ui);\n }\n });\n });\n $('.round-edit').on(\"click\", function() {\n var element;\n element = $(this);\n return $.ajax({\n url: element.data(\"edit-url\"),\n data: {},\n success: function(data) {\n $(\"#modal-round-edit\").find('.round-edit-body').html(data);\n init_time_picker();\n if ($('select').length > 0 && $.fn.material_select) {\n $('select').material_select();\n }\n $(\"#modal-round-edit\").find($(\".modal-close\")).click(function() {\n return $(\"#modal-round-edit\").modal('close');\n });\n break_rounds_ready();\n brief_rounds_ready();\n brainstorm_rounds_ready();\n return init_date_picker();\n }\n });\n });\n drop_element = function(element, event, ui) {\n var mission_id;\n if ($(ui.draggable.data('modal')).attr('id') === 'modal-brainstorming') {\n mission_id = $('#mission_id').val();\n $.ajax({\n type: 'POST',\n url: '/ideations/' + mission_id + '/brain_storm_rounds',\n data: {\n brain_storm_round: {\n title: 'Brainstorm',\n duration: '1',\n duration_hours: '00:00',\n score_type: 0\n }\n },\n success: function(data) {\n $(\"#modal-round-edit\").modal('open');\n $(\"#modal-round-edit\").find('.round-edit-body').html(data);\n break_rounds_ready();\n brief_rounds_ready();\n brainstorm_rounds_ready();\n init_time_picker();\n if ($('select').length > 0 && $.fn.material_select) {\n $('select').material_select();\n }\n return $(\"#modal-round-edit\").find($(\".modal-close\")).click(function() {\n return $(\"#modal-round-edit\").modal('close');\n });\n }\n });\n } else {\n $(ui.draggable.data('modal')).modal('open');\n }\n return setTimeout(function() {\n break_rounds_ready();\n brief_rounds_ready();\n return brainstorm_rounds_ready();\n }, 100);\n };\n $('.open-objective-leader-board').on(\"click\", function() {\n var element;\n element = $(this);\n return $.ajax({\n url: element.data(\"url\"),\n data: {},\n success: function(data) {\n $(\"#objective-leaderboard-review\").html(data);\n $(\"#objective-leaderboard-review\").find($('ul.tabs')).tabs();\n $(\"#objective-leaderboard-review\").find($('.scroller').not('.slick-initialized')).slick({\n dots: true\n });\n return $(\"#ideas-tab-button\").on(\"click\", function() {\n return $(\"#objective-leaderboard-review\").find($('.scroller').not('.slick-initialized')).slick({\n dots: true\n });\n });\n }\n });\n });\n $('.open-mission-leader-board').on(\"click\", function() {\n var element;\n element = $(this);\n return $.ajax({\n url: element.data(\"url\"),\n data: {},\n success: function(data) {\n $(\"#mission-leaderboard.modal\").html(data);\n var tabsElement = $(\"#mission-leaderboard.modal\").find('ul.tabs');\n if (tabsElement.length) {\n tabsElement.tabs();\n } else {\n console.log(\"ul.tabs not found in #mission-leaderboard.modal, skipping tabs initialization.\");\n }\n return $(\"#mission-leaderboard.modal\").find($(\".modal-close\")).click(function() {\n return $(\"#mission-leaderboard\").modal('close');\n });\n }\n });\n });\n return $('.open-info').on(\"click\", function() {\n var element;\n $('.time-disposeable').countdown('destroy');\n element = $(this);\n return $.ajax({\n url: element.data(\"url\"),\n data: {},\n success: function(data) {\n $(\".info-content\").html(data);\n $('.info-content').find('a.modal-close').click(function() {\n return $('.info-content').siblings('button.modal-close').click();\n });\n start_timers();\n return next_prev_event_register();\n },\n error: function(data) {\n return $('#open-briefing.modal').modal('close');\n }\n });\n });\n});\n","import confetti from 'canvas-confetti';\n\nconsole.log('Confetti imported:', confetti);\n\ndocument.addEventListener('DOMContentLoaded', () => {\n console.log('DOM fully loaded and parsed');\n const button = document.getElementById('preview-confetti-button');\n var celebration;\n // Function to get URL parameter value\n function getUrlParameter(name) {\n name = name.replace(/[\\[]/, '\\\\[').replace(/[\\]]/, '\\\\]');\n var regex = new RegExp('[\\\\?&]' + name + '=([^&#]*)');\n var results = regex.exec(location.search);\n return results === null ? '' : decodeURIComponent(results[1].replace(/\\+/g, ' '));\n }\n celebration = getUrlParameter('celebration');\n if (celebration != '')\n {\n runConfetti()\n }\n function triggerConfetti() {\n var button = document.getElementById('preview-confetti-button');\n celebration = button.dataset.confettiType\n runConfetti()\n }\n // Get the \"celebration\" parameter value\n if (button) {\n button.addEventListener('click', triggerConfetti);\n }\n function runConfetti(){\n switch (celebration) {\n case 'basic':\n confetti({\n particleCount: 100,\n spread: 70,\n origin: { y: 0.6 }\n });\n case 'random':\n function randomInRange(min, max) {\n return Math.random() * (max - min) + min;\n }\n \n confetti({\n angle: randomInRange(55, 125),\n spread: randomInRange(50, 70),\n particleCount: randomInRange(50, 100),\n origin: { y: 0.6 }\n });\n case 'realistic':\n var count = 200;\n var defaults = {\n origin: { y: 0.7 }\n };\n\n function fire(particleRatio, opts) {\n confetti({\n ...defaults,\n ...opts,\n particleCount: Math.floor(count * particleRatio)\n });\n }\n\n fire(0.25, {\n spread: 26,\n startVelocity: 55,\n });\n fire(0.2, {\n spread: 60,\n });\n fire(0.35, {\n spread: 100,\n decay: 0.91,\n scalar: 0.8\n });\n fire(0.1, {\n spread: 120,\n startVelocity: 25,\n decay: 0.92,\n scalar: 1.2\n });\n fire(0.1, {\n spread: 120,\n startVelocity: 45,\n });\n case 'fireworks':\n var duration = 5 * 1000;\n var animationEnd = Date.now() + duration;\n var defaults = { startVelocity: 30, spread: 360, ticks: 60, zIndex: 0 };\n\n function randomInRange2(min, max) {\n return Math.random() * (max - min) + min;\n }\n\n var interval = setInterval(function() {\n var timeLeft = animationEnd - Date.now();\n\n if (timeLeft <= 0) {\n return clearInterval(interval);\n }\n\n var particleCount = 50 * (timeLeft / duration);\n // since particles fall down, start a bit higher than random\n confetti({ ...defaults, particleCount, origin: { x: randomInRange2(0.1, 0.3), y: Math.random() - 0.2 } });\n confetti({ ...defaults, particleCount, origin: { x: randomInRange2(0.7, 0.9), y: Math.random() - 0.2 } });\n }, 250);\n break;\n \n case 'stars':\n var defaults = {\n spread: 360,\n ticks: 50,\n gravity: 0,\n decay: 0.94,\n startVelocity: 30,\n colors: ['FFE400', 'FFBD00', 'E89400', 'FFCA6C', 'FDFFB8']\n };\n \n function shoot() {\n confetti({\n ...defaults,\n particleCount: 40,\n scalar: 1.2,\n shapes: ['star']\n });\n \n confetti({\n ...defaults,\n particleCount: 10,\n scalar: 0.75,\n shapes: ['circle']\n });\n }\n \n setTimeout(shoot, 0);\n setTimeout(shoot, 100);\n setTimeout(shoot, 200);\n\n break;\n case 'snow':\n var duration = 5 * 1000;\n var animationEnd = Date.now() + duration;\n var skew = 1;\n\n function randomInRange3(min, max) {\n return Math.random() * (max - min) + min;\n }\n\n (function frame() {\n var timeLeft = animationEnd - Date.now();\n var ticks = Math.max(200, 500 * (timeLeft / duration));\n skew = Math.max(0.8, skew - 0.001);\n\n confetti({\n particleCount: 1,\n startVelocity: 0,\n ticks: ticks,\n origin: {\n x: Math.random(),\n // since particles fall down, skew start toward the top\n y: (Math.random() * skew) - 0.2\n },\n colors: ['#ffffff'],\n shapes: ['circle'],\n gravity: randomInRange3(0.4, 0.6),\n scalar: randomInRange3(0.4, 1),\n drift: randomInRange3(-0.4, 0.4)\n });\n\n if (timeLeft > 0) {\n requestAnimationFrame(frame);\n }\n }());\n\n break;\n case 'school_pride':\n var end = Date.now() + (5 * 1000);\n\n var colors = ['#bb0000', '#ffffff'];\n\n (function frame() {\n confetti({\n particleCount: 2,\n angle: 60,\n spread: 55,\n origin: { x: 0 },\n colors: colors\n });\n confetti({\n particleCount: 2,\n angle: 120,\n spread: 55,\n origin: { x: 1 },\n colors: colors\n });\n\n if (Date.now() < end) {\n requestAnimationFrame(frame);\n }\n }());\n break;\n\n default:\n console.log('No celebration type matched');\n }\n }\n});\n","/*\n * decaffeinate suggestions:\n * DS102: Remove unnecessary code created because of implicit returns\n * Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md\n */\n// Import TinyMCE\nimport tinymce from 'tinymce/tinymce';\n\n// A theme is also required\nimport 'tinymce/themes/silver/theme';\n// import 'tinymce/themes/mobile/theme';\nimport 'tinymce/icons/default';\n// Any plugins you want to use has to be imported\nimport 'tinymce/plugins/paste';\nimport 'tinymce/plugins/link';\nimport 'tinymce/plugins/spellchecker';\nimport 'tinymce/plugins/table';\nimport 'tinymce/plugins/textcolor'\nimport 'tinymce/plugins/wordcount';\nimport 'tinymce/plugins/autolink';\nimport 'tinymce/plugins/advlist';\nimport 'tinymce/plugins/image';\nimport 'tinymce/plugins/lists';\nimport 'tinymce/plugins/charmap';\nimport 'tinymce/plugins/print';\nimport 'tinymce/plugins/preview';\nimport 'tinymce/plugins/code';\nimport 'tinymce/plugins/media';\nimport 'tinymce/plugins/emoticons';\nimport 'tinymce/plugins/emoticons/js/emojis';\nimport 'tinymce/plugins/directionality';\n\n// Initialize the app\nexport var tinymce_settings = { \n selector: 'textarea.tinymce',\n //theme: 'mobile'\n skin: false,\n content_style: 'p { font-family: sans-serif; margin:0; }',\n plugins: ['advlist', 'autolink', 'image', 'lists', 'charmap', 'print', 'code', 'media', 'paste', 'link', 'spellchecker', 'table', 'wordcount'],\n convert_urls: false,\n image_class_list: [\n {\n title: 'Responsive',\n value: 'responsive-img'\n }\n ],\n menubar: false,\n content_css: '/assets/tinymce.css',\n paste_retain_style_properties: \"\",\n toolbar: 'undo redo | pastetext removeformat | bold italic underline | alignleft aligncenter alignright alignjustify | link bullist numlist | backcolor emoticons blockquote | emoticons | menu-template-button | dynamic-button',\n target_list: [{title: 'New window', value: '_blank'}],\n setup(editor){\n return editor.on('change', function() {\n editor.save();\n const title_elem = $($(editor.targetElm).data('preview-title'));\n title_elem.addClass(\"preview-h5\");\n title_elem.text($(editor.targetElm).data('preview-title-text'));\n $($(editor.targetElm).data('preview-text')).html($(editor.targetElm).val());\n return $('.end-note-text:visible').html( $('.ending_text').val());\n });\n }\n};\n\nexport {tinymce};","import {\n disable_default_form_submit\n} from './common';\n\nimport $ from 'jquery';\n\nimport {\n tinymce,\n tinymce_settings\n} from '../shared/tinymce';\n\nwindow.brainstorm_round_image = function() {\n $(\".brainstorm-round-image:visible\").off(\"change\");\n return $(\".brainstorm-round-image:visible\").on(\"change\", function() {\n return Materialize.toast(\"Please save the round to preview the image.\", 2000);\n });\n};\n\nwindow.brainstorm_rounds_ready = function() {\n var re_register_round_click;\n if ($('#brain_storm_round_add_categories').is(':checked')) {\n $(\".ideation-categories-lists\").show();\n } else {\n $(\".ideation-categories-lists\").hide();\n }\n $(document).on('click', '#brain_storm_round_add_categories', function(e) {\n if ($('#brain_storm_round_add_categories').is(':checked')) {\n return $(\".ideation-categories-lists\").show();\n } else {\n return $(\".ideation-categories-lists\").hide();\n }\n });\n if ($(document).find('.sortable').length > 0) {\n // $(document).find('.sortable').railsSortable();\n }\n $('.delete-bs-category').off('click');\n $('.delete-bs-category').on('click', function(e) {\n var brain_storm_round_id, mission_id;\n if (confirm('Are you sure you want to delete this category?')) {\n mission_id = $('#mission_id').val();\n brain_storm_round_id = $('#brain_storm_round_id').val();\n return $.ajax({\n type: 'DELETE',\n url: '/brain_storm_categories/' + this.id,\n data: {\n brain_storm_round_id: brain_storm_round_id,\n mission_id: mission_id\n },\n success: function(data) {}\n });\n }\n });\n $(\".add-bs-category\").off('click');\n $(\".add-bs-category\").on('click', function() {\n var brain_storm_round_id, category_value, mission_id;\n mission_id = $('#mission_id').val();\n brain_storm_round_id = $('#brain_storm_round_id').val();\n category_value = $('#category-input').val();\n if (category_value !== '') {\n return $.ajax({\n type: 'POST',\n url: '/brain_storm_categories',\n data: {\n brain_storm_round_id: brain_storm_round_id,\n mission_id: mission_id,\n categories: {\n title: category_value\n }\n },\n success: function(data) {}\n });\n } else {\n return Materialize.toast('Enter category please', data[\"message\"]``, 5000);\n }\n });\n $('.edit-bs-category').off('click');\n $('.edit-bs-category').on('click', function(e) {\n var brain_storm_round_id, mission_id;\n mission_id = $('#mission_id').val();\n brain_storm_round_id = $('#brain_storm_round_id').val();\n return $.ajax({\n type: 'GET',\n url: '/brain_storm_categories/' + this.id + '/edit',\n data: {\n brain_storm_round_id: brain_storm_round_id,\n mission_id: mission_id\n },\n success: function(data) {}\n });\n });\n if(document.querySelector('.tinymce')) {\n tinymce.init(tinymce_settings);\n }\n $('.brain_round_form').removeClass('disabled');\n $('#brain_storm_round_duration').on(\"change\", function() {\n var date, time;\n if ($('.brain_storm_round_duration:visible').length > 0) {\n date = new Date(parseFloat($('.brain_storm_round_duration:visible').data('start-date')));\n $('.brainstorm-start-date-area:visible').text(date_to_string(date));\n $('.brainstorm-end-date-area:visible').text(date_to_string(get_end_date($('.brain_storm_round_duration:visible').data('start-date'), parseInt($(this).val()), $('.brain_storm_round_duration_hours:visible').val())));\n time = $('#brain_storm_round_duration_hours:visible').val().split(\":\");\n return $('.brainstorm-duration-area:visible').text($(this).val() + \"D \" + time[0] + \"H \" + time[1] + \"M\");\n }\n });\n $('.brain_storm_round_duration_hours:visible').on(\"change\", function() {\n var time;\n time = $('.brain_storm_round_duration_hours:visible').val().split(\":\");\n $('.brainstorm-duration-area:visible').text($('#brain_storm_round_duration').val() + \"D \" + time[0] + \"H :\" + time[1] + \"M\");\n return $('.brainstorm-end-date-area:visible').text(date_to_string(get_end_date($('.brain_storm_round_duration:visible').data('start-date'), parseInt($('#brain_storm_round_duration').val()), $('.brain_storm_round_duration_hours:visible').val())));\n });\n $('.brain_storm_round_question:visible').on(\"input\", function() {\n return $('.brainstorm-question-area:visible').text($('.brain_storm_round_question:visible').val());\n });\n $(\"#target_ideas_meter\").on(\"change\", function() {\n if ($(\"#target_ideas_meter\").val() === \"true\") {\n return $(\"#brain_storm_round_target_ideas\").show();\n } else {\n return $(\"#brain_storm_round_target_ideas\").hide();\n }\n });\n $('.brain_storm_round_description:visible').on(\"input\", function() {\n return $('.brainstorm-text-area:visible').text($('.brain_storm_round_description:visible').val());\n });\n $('.brain_storm_round_description:visible').trigger('input');\n $('.brain_storm_round_question:visible').trigger('input');\n $('.brain_storm_round_duration_hours:visible').trigger('change');\n if ($('.brain_storm_round_duration:visible').length > 0) {\n $('#brain_storm_round_duration').trigger('change');\n }\n $(\"#brain_storm_round_score_type\").on(\"change\", function() {\n var prev_val, selected_val;\n selected_val = $(this).val();\n prev_val = $(\"#prev_score_type\").val();\n if ($(\"#mission_started\").val() === \"true\") {\n if (selected_val !== prev_val) {\n return $(\"#alert_review\").val(true);\n } else if (selected_val === prev_val) {\n return $(\"#alert_review\").val(false);\n }\n }\n });\n $(\"#solo_checked\").on(\"change\", function() {\n var prev_val, selected_val;\n selected_val = $(this).val();\n prev_val = $(\"#prev_score_type\").val();\n if ($(\"#mission_started\").val() === \"true\") {\n if (selected_val !== prev_val) {\n return $(\"#alert_review\").val(true);\n } else if (selected_val === prev_val) {\n return $(\"#alert_review\").val(false);\n }\n }\n });\n $('.brain_storm_round_submit').click(function(e) {\n var brainstorm_data, brainstorm_form;\n if ($(\".brain_storm_round_question:visible\").val() === \"\" || $(\".brainstorm_text\").val() === \"\") {\n $('.toast').remove();\n Materialize.toast(\"Question or BrainStorm text can not be empty.\", 2000);\n e.preventDefault();\n } else if ($(\"#brain_storm_round_is_critical\").val() === \"\") {\n $('.toast').remove();\n Materialize.toast(\"Critical can not be empty.\", 2000);\n e.preventDefault();\n } else if ($(\"#brain_storm_round_duration_hours\").val() === \"\") {\n $('.toast').remove();\n Materialize.toast(\"Time can not be empty.\", 2000);\n e.preventDefault();\n } else if ($(\"#alert_review\").val() === \"true\") {\n $('.toast').remove();\n Materialize.toast(\"You can not change review type now\", 2000);\n e.preventDefault();\n } else if ($('#brain_storm_round_is_reminder_required').val() === 'true' && Date.parse($('.brainstorm-start-date-area').text()) > Date.parse($('#brain_storm_round_notification_date').val().split('/')[2] + '-' + $('#brain_storm_round_notification_date').val().split('/')[1] + '-' + $('#brain_storm_round_notification_date').val().split('/')[0] + ' ' + $('#brain_storm_round_notification_time').val())) {\n $('.toast').remove();\n Materialize.toast(\"Brain storm round notification date should be be greater than round start date\", 2000);\n e.preventDefault();\n } else {\n if (!$('.brain_round_form').hasClass('disabled')) {\n e.preventDefault();\n $('.brain_round_form').addClass('disabled');\n if ($(\"#target_ideas_meter\").prop(\"checked\") === false) {\n $(\"#brain_storm_round_target_ideas\").remove();\n }\n brainstorm_form = document.getElementById(\"brain_round_form_submit\");\n brainstorm_data = new FormData(brainstorm_form);\n $.ajax({\n type: $(\"#brain_round_form_submit\").attr(\"method\"),\n url: $(\"#brain_round_form_submit\").attr(\"action\"),\n data: brainstorm_data,\n processData: false,\n contentType: false,\n success: function(response) {\n var $errors_content;\n disable_default_form_submit();\n show_notice_toast();\n $(document).trigger('ajax:complete');\n if ($(response).filter(\"#error_explanation\").length > 0) {\n $errors_content = $(response).filter(\"#error_explanation\")[0];\n Materialize.toast($errors_content, 4000);\n return $(document).trigger('ajax:complete');\n } else {\n $('.modal.open').modal('close');\n $('#mission-builder-new').html(response);\n Materialize.toast(\"Success\", 4000);\n return $(document).trigger('ajax:complete');\n }\n }\n });\n }\n }\n });\n $('.qa_round_form').removeClass('disabled');\n $('.qa_round_duration:visible').on('change', function() {\n var date, time;\n date = new Date(parseFloat($(this).data('start-date')));\n $('.brainstorm-start-date-area:visible').text(date_to_string(date));\n $('.brainstorm-end-date-area:visible').text(date_to_string(get_end_date($('.qa_round_duration:visible').data('start-date'), $('.qa_round_duration:visible').data('duration'), $('.qa_round_duration_hours:visible').val())));\n time = $('.qa_round_duration_hours:visible').val().split(\":\");\n return $('.qa-duration-area:visible').text($('.qa_round_duration:visible').data('duration') + \"D \" + time[0] + \"H \" + time[1] + \"M\");\n });\n $(document).on('change', '.qa_selected_duration_options', function(e) {\n var time;\n if ($(e.target).val() !== \"\") {\n $('.brainstorm-end-date-area:visible').text(date_to_string(get_end_date($('.qa_round_duration:visible').data('start-date'), parseInt($(e.target).val()), $('.qa_round_duration_hours:visible').val())));\n time = $('.qa_round_duration_hours:visible').val().split(\":\");\n $('.brainstorm-duration-area:visible').text($(e.target).val() + \"D \" + time[0] + \"H \" + time[1] + \"M\");\n }\n });\n $('.qa_round_duration_hours:visible').on(\"change\", function() {\n var time;\n time = $('.qa_round_duration_hours:visible').val().split(\":\");\n $('.brainstorm-duration-area:visible').text($('#brain_storm_round_duration.qa_selected_duration_options').val() + \"D \" + time[0] + \"H :\" + time[1] + \"M\");\n return $('.brainstorm-end-date-area:visible').text(date_to_string(get_end_date($('.qa_round_duration:visible').data('start-date'), parseInt($('#brain_storm_round_duration.qa_selected_duration_options').val()), $('.qa_round_duration_hours:visible').val())));\n });\n $('.question_round_question:visible').on(\"input\", function() {\n return $('.brainstorm-question-area:visible').text($(this).val());\n });\n $('.qa_round_description:visible').on(\"input\", function() {\n return $('.qa-text-area:visible').text($(this).val());\n });\n $('.qa_round_description:visible').trigger('input');\n $('.question_round_question:visible').trigger('input');\n $('.qa_round_duration_hours:visible').trigger('change');\n $('.qa_round_duration:visible').trigger('change');\n $('#answer_count').change(function() {\n var results, selected_val, start;\n selected_val = $(this).val();\n start = 0;\n while (start < selected_val) {\n $(this).closest(\"form\").find(\"input[name='brain_storm_round[answer_choices_attributes][\" + start + \"][answer]']\").css(\"display\", \"block\");\n $(this).closest(\"form\").find(\"input[name='brain_storm_round[answer_choices_attributes][\" + start + \"][marked]']\").css(\"display\", \"block\");\n $(this).closest(\"form\").find(\"input[name='brain_storm_round[answer_choices_attributes][\" + start + \"][choice_number]']\").addClass('displayed').removeClass('invisibled');\n start++;\n }\n if (start !== 7) {\n results = [];\n while (start <= 7) {\n $(this).closest(\"form\").find(\"input[name='brain_storm_round[answer_choices_attributes][\" + start + \"][answer]']\").css(\"display\", \"none\");\n $(this).closest(\"form\").find(\"input[name='brain_storm_round[answer_choices_attributes][\" + start + \"][marked]']\").css(\"display\", \"none\");\n $(this).closest(\"form\").find(\"input[name='brain_storm_round[answer_choices_attributes][\" + start + \"][choice_number]']\").addClass('invisibled').removeClass('displayed');\n results.push(start++);\n }\n return results;\n }\n });\n $('#question_answer_submit:visible').click(function(e) {\n var qa_data, qa_form, reqlength, value;\n reqlength = $(\".answer-choice-text:visible\").length;\n console.log(reqlength);\n value = $(\".answer-choice-text:visible\").filter(function() {\n return this.value !== '';\n });\n if ($(\".question_round_question:visible\").val() === \"\" || $(\".question_round_text:visible\").val() === \"\") {\n $('.toast').remove();\n Materialize.toast(\"Question or BrainStorm text can not be empty.\", 2000);\n return e.preventDefault();\n } else if ($(\"#qa_round_is_critical\").val() === \"\") {\n $('.toast').remove();\n Materialize.toast(\"Critical can not be empty.\", 2000);\n return e.preventDefault();\n } else if (value.length >= 0 && value.length !== reqlength) {\n $('.toast').remove();\n Materialize.toast(\"Answer Choice Text can not be empty.\", 2000);\n return e.preventDefault();\n } else {\n if (!$('.qa_round_form').hasClass('disabled')) {\n e.preventDefault();\n $('.qa_round_form').addClass('disabled');\n $(\".question-check:hidden\").remove();\n $(\".answer-choice-text:hidden\").remove();\n $(\".invisibled\").remove();\n qa_form = document.getElementById(\"qa_round_form_submit\");\n qa_data = new FormData(qa_form);\n return $.ajax({\n type: $(\"#qa_round_form_submit\").attr(\"method\"),\n url: $(\"#qa_round_form_submit\").attr(\"action\"),\n data: qa_data,\n processData: false,\n contentType: false,\n success: function(response) {\n var $errors_content;\n disable_default_form_submit();\n show_notice_toast();\n $(document).trigger('ajax:complete');\n if ($(response).filter(\"#error_explanation\").length > 0) {\n $errors_content = $(response).filter(\"#error_explanation\")[0];\n Materialize.toast($errors_content, 4000);\n return $(document).trigger('ajax:complete');\n } else {\n $('.modal.open').modal('close');\n $('#mission-builder-new').html(response);\n Materialize.toast(\"Success\", 4000);\n return $(document).trigger('ajax:complete');\n }\n }\n });\n }\n }\n });\n re_register_round_click = function() {\n var element;\n $('.round-edit').on(\"click\", function() {});\n element = $(this);\n return $.ajax({\n url: element.data(\"edit-url\"),\n data: {},\n success: function(data) {\n $(\"#modal-round-edit\").find('.round-edit-body').html(data);\n init_time_picker();\n if ($('select').length > 0 && $.fn.material_select) {\n $('select').material_select();\n }\n $(\"#modal-round-edit\").find($(\".modal-close\")).click(function() {\n return $(\"#modal-round-edit\").modal('close');\n });\n setTimeout(function() {\n break_rounds_ready();\n brief_rounds_ready();\n return brainstorm_rounds_ready();\n }, 100);\n return init_date_picker();\n }\n });\n };\n $(\".brainstorm-round-show-advance-fields\").on(\"click\", function() {\n $(\".brainstorm-round-adv\").hide();\n $(\".brainstorm-round-advance-fields\").removeClass('hide');\n return brainstorm_round_image();\n });\n $(\".brainstorm-round-hide-advance-fields\").on(\"click\", function() {\n $(\".brainstorm-round-advance-fields\").addClass('hide');\n $(\".brainstorm-round-adv\").show();\n return brainstorm_round_image();\n });\n $('.image-upload').hover((function() {\n $('.mission-edit-mission-pic').css('opacity', '0.6');\n return $('.add-opacity').css('opacity', '1');\n }), function() {\n $('.mission-edit-mission-pic').css('opacity', '1');\n return $('.add-opacity').css('opacity', '0');\n });\n return brainstorm_round_image();\n};\n\n$(document).ready(brainstorm_rounds_ready);\n\ndocument.addEventListener('ajax:complete', brainstorm_rounds_ready);\n","/*\n * decaffeinate suggestions:\n * DS102: Remove unnecessary code created because of implicit returns\n * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md\n */\n// Place all the behaviors and hooks related to the matching controller here.\n// All this logic will automatically be available in application.js.\n// You can use CoffeeScript in this file: http://coffeescript.org/\n\nwindow.invite_round_image = function() {\n $(\".invite-round-image:visible\").off(\"change\");\n return $(\".invite-round-image:visible\").on(\"change\", function() {\n return Materialize.toast(\"Please save the round to preview the image.\", 2000);\n });\n};\nvar invitation_rounds_ready = function invitation_rounds_ready() {\n\n //Preview of Invitation Round!!\n $('#invite_round_invite_text').on(\"input\", function() {\n $('#invitation-text-preview').addClass(\"preview-h5\");\n $('#invitation-text-preview').text(\"Mission Invitation\");\n return $('.invitation-area').html($('#invite_round_invite_text').val().replace(/\\r\\n|\\r|\\n/g,\"
\"));\n });\n\n\n $('#invite_round_send_on').on(\"change\", function() {\n $('#start-invitation-date').addClass(\"preview-h5\");\n $('#start-invitation-date').text(\"Invitation Starts On\");\n return $('.start-date-area').text($('#invite_round_send_on').val()+\" \"+ $('#invite_round_send_on_time').val());\n });\n\n\n $('#invite_round_end_date').on(\"change\", function() {\n $('#end-invitation-date').addClass(\"preview-h5\");\n $('#end-invitation-date').text(\"Invitation DeadLine\");\n return $('.end-date-area').text($('#invite_round_end_date').val()+\" \"+ $('#invite_round_end_time').val());\n });\n\n\n $('#invite_round_send_on_time').on(\"change\", function() {\n $('#start-invitation-date').addClass(\"preview-h5\");\n $('#start-invitation-date').text(\"Invitation Starts On\");\n return $('.start-date-area').text($('#invite_round_send_on').val()+\" \"+ $('#invite_round_send_on_time').val());\n });\n\n\n $('#invite_round_end_time').on(\"change\", function() {\n $('#end-invitation-date').addClass(\"preview-h5\");\n $('#end-invitation-date').text(\"Invitation DeadLine\");\n return $('.end-date-area').text($('#invite_round_end_date').val()+\" \"+ $('#invite_round_end_time').val());\n });\n\n $(\".invite-round-show-advance-fields\").on(\"click\", function() {\n $(\".invite-round-adv\").hide();\n $(\".invite-round-advance-fields\").removeClass('hide');\n return invite_round_image();\n });\n\n $(\".invite-round-hide-advance-fields\").on(\"click\", function() {\n $(\".invite-round-advance-fields\").addClass('hide');\n $(\".invite-round-adv\").show();\n return invite_round_image();\n });\n\n $('#invite_round_invite_text').trigger('input');\n $('#invite_round_send_on').trigger('change');\n $('#invite_round_end_date').trigger('change');\n $('#invite_round_send_on_time').trigger('change');\n $('#invite_round_end_time').trigger('change');\n invite_round_image();\n \n $('.send-inbox-invites').off('click'); \n return $('.send-inbox-invites').on('click', function() {\n if ($('.invi_text').val() === '') {\n $('.toast').remove();\n return Materialize.toast('Invitation text can not be empty.', 2000);\n } else {\n var selected_ids = $('#mission-table-Section1 input:checkbox:checked').length;\n var selected_agent = selected_ids + \" agent \";\n if (selected_ids >= 1) { \n selected_agent = selected_ids + \" agents \";\n }\n // if ((selected_ids >= 1) && confirm(\"You've selected \" + selected_agent + \"in the AGENTS tab. Are you sure you want to send the invitation to this agent?\")) {\n // selected_ids = $('#mission-table-Section1 input:checkbox:checked').map(function() {\n // return $(this).val();\n // });\n var form = $('.invitation_mission_form');\n var datastring = form.serialize();\n datastring = datastring + '&' + 'invite_ids' + '=' + '[' + [] + ']'; \n $.ajax({\n method: 'POST',\n url: form.attr('action'),\n data: datastring,\n dataType: 'script'\n });\n // } else { return confirm(\"You've selected \" + $('#mission-table-Section1 input:checkbox:checked').length + \" agent in the AGENTS tab. Are you sure you want to send the invitation to this agent?\"); }\n $('#modal-edit-invite-text').modal('close')\n }\n });\n};\n\n\n$(document).ready(invitation_rounds_ready);\ndocument.addEventListener('ajax:complete', invitation_rounds_ready);\n"],"names":["document","addEventListener","tribute","Tribute","values","search","cb","query","callback","users","length","$","getJSON","q","inbox","data","selectClass","itemClass","menuItemTemplate","item","original","img_url","key","attach","getElementsByClassName","window","break_round_image","off","on","Materialize","toast","break_rounds_ready","querySelector","tinymce","init","tinymce_settings","date","Date","parseFloat","this","text","date_to_string","get_end_date","val","time","split","hide","removeClass","addClass","show","trigger","ready","brief_round_image","brief_rounds_ready","new_brief_page","event","modal","setTimeout","remove","element","preventDefault","first","ajax","url","success","$toast_content","i","len","ref","round_id","single_url","find","html","attr","css","sequence_number","selected_element","approved","attachment_url","current_seq_number","description","embedded_video_code","image_url","checked","page_click","result","status","round_page","difference_check","confirm","start_timers","each","diff","countdown","until","compact","layout","format","onTick","watch_countdown","periods","new_layout","disable_default_form_submit","fn","idea_ready","classList","add","tempDiv","form","isValid","firstInvalidField","siblings","after","content","get","getContent","createElement","innerHTML","textContent","innerText","activeEditor","focus","field","hasClass","trim","contains","submit","title_field","inputValue","lastCharacter","indexOf","console","log","id","dataset","location","href","includes","type","tag_for_mission","selector","plugins","paste_as_text","menubar","content_css","skin","toolbar","setup","editor","plainTextContent","regex","match","formElement","readyState","file","fileObject","reader","currentTarget","files","filetype","filename","name","FileReader","onload","e","image_base64","target","filecontent","replace","readAsDataURL","Gantt","Highcharts","HighchartsMore","HighchartsBullet","HighchartsExporting","HighchartsPattern","HighchartsFunnel","HighchartsExportData","getElementById","chartColor","variable","colorList","colors","chart","inverted","title","legend","enabled","yAxis","gridLineWidth","plotOptions","series","pointPadding","borderWidth","color","targetOptions","width","credits","exporting","tagGraphChart","dataSet","anychart","set","scales","ordinalColor","ranges","from","to","greater","tagCloud","height","mode","colorScale","angles","colorRange","colorLineSize","container","draw","normalFillFunction","normal","fill","hoveredFillFunction","hovered","listen","actualTarget","points","valueToColor","point","open","initSelectionBulletChart","marginTop","xAxis","categories","plotBands","max","y","tooltip","headerFormat","substring","pointFormat","initProjectGanttChart","dateFormat","day","defined","department","ed","em","end_date","ey","isObject","j","len1","project_data","reduce","score","score_data","scores","sd","sm","start_date","sy","today","setUTCHours","setUTCMinutes","setUTCSeconds","setUTCMilliseconds","getTime","push","UTC","_defineProperty","buttons","contextButton","menuItems","events","click","allButtonsEnabled","count","update","min","liveRedraw","pointPlacement","reversed","currentDateIndicator","pointFormatter","completed","lines","options","amount","value","style","start","end","owner","stage","str","line","s","visible","chartHeight","initPackedBubbleGraph","redirect_scores","standardColors","useHTML","align","verticalAlign","floating","backgroundColor","packedbubble","minSize","maxSize","zMin","zMax","layoutAlgorithm","gravitationalConstant","splitSeries","seriesInteraction","dragBetweenSeries","parentNodeLimit","dataLabels","parentNodeFormat","filter","property","operator","textOutline","textOverflow","fontWeight","selected_score","tag_id","map","_objectSpread","Math","floor","random","initLineTagsGraph","months","point_data","label","connectorAllowed","responsive","rules","condition","maxWidth","chartOptions","initInboxIdeasGraph","scores_data","linearGradient","stops","cursor","enableMouseTracking","loc","x","inbox_id","idea_id","mouseOver","idea_title","showInLegend","initBubbleGraph","board","initIdeasGraph","initTagsGraph","idea_count","project_count","slice","brighten","allowDecimals","formatter","stackTotal","column","stacking","stack","init3dBubbleGraph","graph_container_elem","data_type","xtitle","JSON","parse","ytitle","ztitle","plotBorderWidth","plotBorderColor","zoomType","startOnTick","endOnTick","concat","x_axis","y_axis","z_axis","z","followPointer","marker","fillColor","radialGradient","cx","cy","r","setOpacity","lineColor","lineWidth","states","hover","dashboardIdeaChart","getAttribute","last_30","colorByPoint","initCharts","pointWidth","accessibility","announceNewData","drilldown","plotBackgroundColor","plotShadow","valueSuffix","pie","size","allowPointSelect","softConnector","center","userOptions","inside","taskCharts","taskData","objectTitle","transformedData","now","transformedItem","toString","due_date","startDate","endDate","phase","parent","transformTaskData","firstTaskStartDate","minDate","task","lastTaskStartDate","maxDate","connectors","dashStyle","radius","startMarker","padding","opacity","task_id","admin_ready","dateTimeLabelFormats","grid","custom","weekendPlotBands","labels","symbol","staticScale","keyboardNavigation","seriesNavigation","descriptionFormatter","completedValue","round","dependency","dependsOn","milestone","lang","axis","xAxisDescriptionPlural","isWeekend","t","test","inWeekend","ceil","last","at","pattern","path","setExtremes","trib","contents","childNodes","jQuery","validateEmail","keyup","on_input","input","selectionStart","selectionEnd","toLowerCase","setSelectionRange","email","row","insertRow","cell1","insertCell","cell2","cell3","material_select","change","readAsText","ee","imported_data","Papa","shift","elems","append","first_name","last_name","undefined","next_prev_event_register","require","next_element","display","rounds_ready","error","prev_element","drop_element","view_url","parents","sortable","ui","index","new_index","old_index","replaced_id","replaced_object","replacing_id","replacing_object","move_params","disableSelection","droppable","accept","classes","drop","init_time_picker","brainstorm_rounds_ready","init_date_picker","mission_id","draggable","brain_storm_round","duration","duration_hours","score_type","tabs","not","slick","dots","tabsElement","confetti","celebration","button","runConfetti","particleCount","spread","origin","randomInRange","angle","fire","particleRatio","opts","defaults","startVelocity","decay","scalar","randomInRange2","animationEnd","interval","ticks","zIndex","setInterval","timeLeft","clearInterval","shoot","shapes","gravity","randomInRange3","skew","frame","drift","requestAnimationFrame","results","RegExp","exec","decodeURIComponent","getUrlParameter","confettiType","content_style","convert_urls","image_class_list","paste_retain_style_properties","target_list","save","title_elem","targetElm","brainstorm_round_image","is","brain_storm_round_id","category_value","_templateObject","parseInt","prev_val","selected_val","brainstorm_data","brainstorm_form","prop","FormData","processData","contentType","response","$errors_content","show_notice_toast","closest","qa_data","qa_form","reqlength","invite_round_image","invitation_rounds_ready","selected_ids","datastring","serialize","method","dataType"],"sourceRoot":""}