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AAc,gBACdJ,YAAY,EACZpH,OAAQ,OACR0G,UAAW,yCACXiB,WAAY,qBACZI,aAAa,EACb5B,mBAAmB,EACnBQ,aAAa,EACbkB,cAAe,iBACfC,KAAK,GAmQ0BhE,EAAOI,QAC9C,CAEA,SAASO,EAAYT,GACZP,IAAcA,EAAaW,KAC5BJ,EAAcyG,GAAG,cAGrBzG,EAAc9C,SACd8C,EAAgB,KACqB,IAAjCP,EAAWc,WAAW1G,SACtB4F,EAAWvC,SACXyC,OAAgB0F,GAExB,CAEH,CApcM,EAqcV,4B","sources":["webpack://itreview/./app/frontend/entry/client/common.js","webpack://itreview/./node_modules/foundation-datepicker/js/locales/foundation-datepicker.ja.js","webpack://itreview/./node_modules/toastr/toastr.js"],"sourcesContent":["import 'foundation-sites';\nimport 'foundation-datepicker';\nimport 'foundation-datepicker/js/locales/foundation-datepicker.ja';\nimport Rails from '@rails/ujs';\n\n$(() => {\n $(document).foundation();\n Rails.start();\n document.dispatchEvent(new CustomEvent('rails-ujs-started'));\n $('.notice-message').each(function () {\n if ($(this).hasClass('warning')) {\n Toastr.warning($(this).html().trim());\n } else if ($(this).hasClass('error') || $(this).hasClass('alert')) {\n Toastr.error($(this).html().trim());\n } else {\n Toastr.success($(this).html().trim());\n }\n });\n\n const errors = $('#error_explanation li').map(function () { return $(this).html().trim(); });\n if (errors.length > 0) {\n Toastr.error(errors.get().join('
'));\n }\n\n // メニューのis-active判定\n // li.list_itemのdata-active属性の値がbodyタグのclassに含まれていれば、is-active\n $('li.list_item').each(function () {\n if ($('body').hasClass($(this).data('active'))) {\n $(this).addClass('is-active');\n }\n });\n\n const currentPathName = window.location.pathname.split('/').slice(3, 4).join('/');\n $('.vertical_item').each(function () {\n const item = $(this);\n item.find('a').each(function () {\n const path = new URL(this.href).pathname.split('/').slice(3, 4).join('/');\n if (path.length > 0 && path === currentPathName) {\n item.find('>input').attr('checked', true);\n }\n });\n });\n $('.analyses_vertical_item').each(function () {\n const item = $(this);\n item.find('a').each(function () {\n const path = new URL(this.href).pathname.split('/').slice(3, 5).join('/');\n if (path.length > 0 && path === window.location.pathname.split('/').slice(3, 5).join('/')) {\n item.find('>input').attr('checked', true);\n }\n });\n });\n\n $('.input_datepicker').each(function () {\n $(this).fdatepicker({\n format: 'yyyy/mm/dd',\n language: 'ja',\n leftArrow: '<',\n rightArrow: '︎>',\n startDate: $(this).data('start-date') || '',\n endDate: $(this).data('end-date') || '',\n });\n });\n\n // image preview settings\n const elements = document.querySelectorAll('.available-preview');\n Array.prototype.forEach.call(elements, (el, _i) => {\n el.addEventListener('change', function (event) {\n const file = event.target.files[0];\n\n // Only process image file.\n if (!file || !file.type.match('image.*')) {\n return;\n }\n\n const reader = new FileReader();\n const previewElement = this.getAttribute('data-preview-element');\n reader.onload = (function (_theFile) {\n return function (e) {\n const content = ``;\n const target = document.getElementById(previewElement);\n target.innerHTML = content;\n if (target.parentElement.classList.contains('no-image')) {\n target.parentElement.classList.remove('no-image');\n }\n };\n }(file));\n\n // Read in the image file as a data URL.\n reader.readAsDataURL(file);\n });\n });\n\n $('.hide-before-load').removeClass('hide-before-load');\n\n const SwapZIndex = (currentObject, reminderElements) => {\n Array.prototype.forEach.call(reminderElements, (el, _i) => {\n el.style.zIndex = 1;\n });\n currentObject.style.zIndex = 2;\n };\n\n $('.sidemenu-reminder').on('click', (e) => {\n const reminderElements = document.querySelectorAll('.sidemenu-review_campaign_reminder');\n SwapZIndex(e.currentTarget, reminderElements);\n });\n\n $('.sidemenu-review_campaign_reminder').on('click', (e) => {\n const reminderElements = document.querySelectorAll('.sidemenu-reminder');\n SwapZIndex(e.currentTarget, reminderElements);\n });\n\n // 製品紹介文が登録されていない時のリマインダー非表示\n $('.close-reminder').on('click', (e) => {\n e.preventDefault();\n $('.sidemenu-reminder').hide();\n });\n\n // 開始7日以内で準備中のレビューキャンペーンがある時のリマインダー非表示\n $('.close-eview-campaign-reminder').on('click', (e) => {\n e.preventDefault();\n e.currentTarget.parentElement.hidden = true;\n const productId = window.location.pathname.split('/')[2];\n const url = `/client/${productId}/review_campaigns/review_campaign_close_remander`;\n // セッション情報を設定する\n $.ajax({\n url,\n dataType: 'json',\n });\n });\n\n // 受賞済みバッジで取得可能なバッジを選択するラジオボタンをクリックした時に説明文が表示される\n const badgeExplanations = {\n normal: '総合部門で受賞した結果を表示しています',\n large_company: '大企業(従業員数1,000人以上の企業)に評価された称号を表示しています',\n mid_company: '中堅企業(従業員数100~999人の企業)に評価された称号を表示しています',\n small_company: '中小企業(従業員数100人未満の企業)に評価された称号を表示しています',\n year: '3年間同じ種別のバッジを連続で受賞した称号を表示しています',\n };\n const radioBtn = document.querySelectorAll(\"input[type='radio'][name='company-size']\");\n for (let i = 0; i < radioBtn.length; i++) {\n radioBtn[i].addEventListener('change', () => {\n if (radioBtn[i].checked && radioBtn[i].value === 'three_year,five_year') {\n document.querySelector('#badge-explanation').innerHTML = badgeExplanations.year;\n } else if (radioBtn[i].checked) {\n document.querySelector('#badge-explanation').innerHTML = badgeExplanations[radioBtn[i].value];\n }\n });\n }\n});\n","/**\n * Japanese translation for foundation-datepicker\n * Norio Suzuki \n */\n;(function($){\n\t$.fn.fdatepicker.dates['ja'] = {\n\t days: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"],\n\t daysShort: [\"日\", \"月\", \"火\", \"水\", \"木\", \"金\", \"土\"],\n\t daysMin: [\"日\", \"月\", \"火\", \"水\", \"木\", \"金\", \"土\"],\n\t months: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\n\t monthsShort: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\n\t today: \"今日\",\n\t format: \"yyyy/mm/dd\",\n\t titleFormat: \"yyyy年 mm月\"\n\t};\n}(jQuery));\n","/*\n * Toastr\n * Copyright 2012-2015\n * Authors: John Papa, Hans Fjällemark, and Tim Ferrell.\n * All Rights Reserved.\n * Use, reproduction, distribution, and modification of this code is subject to the terms and\n * conditions of the MIT license, available at http://www.opensource.org/licenses/mit-license.php\n *\n * ARIA Support: Greta Krafsig\n *\n * Project: https://github.com/CodeSeven/toastr\n */\n/* global define */\n(function (define) {\n define(['jquery'], function ($) {\n return (function () {\n var $container;\n var listener;\n var toastId = 0;\n var toastType = {\n error: 'error',\n info: 'info',\n success: 'success',\n warning: 'warning'\n };\n\n var toastr = {\n clear: clear,\n remove: remove,\n error: error,\n getContainer: getContainer,\n info: info,\n options: {},\n subscribe: subscribe,\n success: success,\n version: '2.1.4',\n warning: warning\n };\n\n var previousToast;\n\n return toastr;\n\n ////////////////\n\n function error(message, title, optionsOverride) {\n return notify({\n type: toastType.error,\n iconClass: getOptions().iconClasses.error,\n message: message,\n optionsOverride: optionsOverride,\n title: title\n });\n }\n\n function getContainer(options, create) {\n if (!options) { options = getOptions(); }\n $container = $('#' + options.containerId);\n if ($container.length) {\n return $container;\n }\n if (create) {\n $container = createContainer(options);\n }\n return $container;\n }\n\n function info(message, title, optionsOverride) {\n return notify({\n type: toastType.info,\n iconClass: getOptions().iconClasses.info,\n message: message,\n optionsOverride: optionsOverride,\n title: title\n });\n }\n\n function subscribe(callback) {\n listener = callback;\n }\n\n function success(message, title, optionsOverride) {\n return notify({\n type: toastType.success,\n iconClass: getOptions().iconClasses.success,\n message: message,\n optionsOverride: optionsOverride,\n title: title\n });\n }\n\n function warning(message, title, optionsOverride) {\n return notify({\n type: toastType.warning,\n iconClass: getOptions().iconClasses.warning,\n message: message,\n optionsOverride: optionsOverride,\n title: title\n });\n }\n\n function clear($toastElement, clearOptions) {\n var options = getOptions();\n if (!$container) { getContainer(options); }\n if (!clearToast($toastElement, options, clearOptions)) {\n clearContainer(options);\n }\n }\n\n function remove($toastElement) {\n var options = getOptions();\n if (!$container) { getContainer(options); }\n if ($toastElement && $(':focus', $toastElement).length === 0) {\n removeToast($toastElement);\n return;\n }\n if ($container.children().length) {\n $container.remove();\n }\n }\n\n // internal functions\n\n function clearContainer (options) {\n var toastsToClear = $container.children();\n for (var i = toastsToClear.length - 1; i >= 0; i--) {\n clearToast($(toastsToClear[i]), options);\n }\n }\n\n function clearToast ($toastElement, options, clearOptions) {\n var force = clearOptions && clearOptions.force ? clearOptions.force : false;\n if ($toastElement && (force || $(':focus', $toastElement).length === 0)) {\n $toastElement[options.hideMethod]({\n duration: options.hideDuration,\n easing: options.hideEasing,\n complete: function () { removeToast($toastElement); }\n });\n return true;\n }\n return false;\n }\n\n function createContainer(options) {\n $container = $('
')\n .attr('id', options.containerId)\n .addClass(options.positionClass);\n\n $container.appendTo($(options.target));\n return $container;\n }\n\n function getDefaults() {\n return {\n tapToDismiss: true,\n toastClass: 'toast',\n containerId: 'toast-container',\n debug: false,\n\n showMethod: 'fadeIn', //fadeIn, slideDown, and show are built into jQuery\n showDuration: 300,\n showEasing: 'swing', //swing and linear are built into jQuery\n onShown: undefined,\n hideMethod: 'fadeOut',\n hideDuration: 1000,\n hideEasing: 'swing',\n onHidden: undefined,\n closeMethod: false,\n closeDuration: false,\n closeEasing: false,\n closeOnHover: true,\n\n extendedTimeOut: 1000,\n iconClasses: {\n error: 'toast-error',\n info: 'toast-info',\n success: 'toast-success',\n warning: 'toast-warning'\n },\n iconClass: 'toast-info',\n positionClass: 'toast-top-right',\n timeOut: 5000, // Set timeOut and extendedTimeOut to 0 to make it sticky\n titleClass: 'toast-title',\n messageClass: 'toast-message',\n escapeHtml: false,\n target: 'body',\n closeHtml: '',\n closeClass: 'toast-close-button',\n newestOnTop: true,\n preventDuplicates: false,\n progressBar: false,\n progressClass: 'toast-progress',\n rtl: false\n };\n }\n\n function publish(args) {\n if (!listener) { return; }\n listener(args);\n }\n\n function notify(map) {\n var options = getOptions();\n var iconClass = map.iconClass || options.iconClass;\n\n if (typeof (map.optionsOverride) !== 'undefined') {\n options = $.extend(options, map.optionsOverride);\n iconClass = map.optionsOverride.iconClass || iconClass;\n }\n\n if (shouldExit(options, map)) { return; }\n\n toastId++;\n\n $container = getContainer(options, true);\n\n var intervalId = null;\n var $toastElement = $('
');\n var $titleElement = $('
');\n var $messageElement = $('
');\n var $progressElement = $('
');\n var $closeElement = $(options.closeHtml);\n var progressBar = {\n intervalId: null,\n hideEta: null,\n maxHideTime: null\n };\n var response = {\n toastId: toastId,\n state: 'visible',\n startTime: new Date(),\n options: options,\n map: map\n };\n\n personalizeToast();\n\n displayToast();\n\n handleEvents();\n\n publish(response);\n\n if (options.debug && console) {\n console.log(response);\n }\n\n return $toastElement;\n\n function escapeHtml(source) {\n if (source == null) {\n source = '';\n }\n\n return source\n .replace(/&/g, '&')\n .replace(/\"/g, '"')\n .replace(/'/g, ''')\n .replace(//g, '>');\n }\n\n function personalizeToast() {\n setIcon();\n setTitle();\n setMessage();\n setCloseButton();\n setProgressBar();\n setRTL();\n setSequence();\n setAria();\n }\n\n function setAria() {\n var ariaValue = '';\n switch (map.iconClass) {\n case 'toast-success':\n case 'toast-info':\n ariaValue = 'polite';\n break;\n default:\n ariaValue = 'assertive';\n }\n $toastElement.attr('aria-live', ariaValue);\n }\n\n function handleEvents() {\n if (options.closeOnHover) {\n $toastElement.hover(stickAround, delayedHideToast);\n }\n\n if (!options.onclick && options.tapToDismiss) {\n $toastElement.click(hideToast);\n }\n\n if (options.closeButton && $closeElement) {\n $closeElement.click(function (event) {\n if (event.stopPropagation) {\n event.stopPropagation();\n } else if (event.cancelBubble !== undefined && event.cancelBubble !== true) {\n event.cancelBubble = true;\n }\n\n if (options.onCloseClick) {\n options.onCloseClick(event);\n }\n\n hideToast(true);\n });\n }\n\n if (options.onclick) {\n $toastElement.click(function (event) {\n options.onclick(event);\n hideToast();\n });\n }\n }\n\n function displayToast() {\n $toastElement.hide();\n\n $toastElement[options.showMethod](\n {duration: options.showDuration, easing: options.showEasing, complete: options.onShown}\n );\n\n if (options.timeOut > 0) {\n intervalId = setTimeout(hideToast, options.timeOut);\n progressBar.maxHideTime = parseFloat(options.timeOut);\n progressBar.hideEta = new Date().getTime() + progressBar.maxHideTime;\n if (options.progressBar) {\n progressBar.intervalId = setInterval(updateProgress, 10);\n }\n }\n }\n\n function setIcon() {\n if (map.iconClass) {\n $toastElement.addClass(options.toastClass).addClass(iconClass);\n }\n }\n\n function setSequence() {\n if (options.newestOnTop) {\n $container.prepend($toastElement);\n } else {\n $container.append($toastElement);\n }\n }\n\n function setTitle() {\n if (map.title) {\n var suffix = map.title;\n if (options.escapeHtml) {\n suffix = escapeHtml(map.title);\n }\n $titleElement.append(suffix).addClass(options.titleClass);\n $toastElement.append($titleElement);\n }\n }\n\n function setMessage() {\n if (map.message) {\n var suffix = map.message;\n if (options.escapeHtml) {\n suffix = escapeHtml(map.message);\n }\n $messageElement.append(suffix).addClass(options.messageClass);\n $toastElement.append($messageElement);\n }\n }\n\n function setCloseButton() {\n if (options.closeButton) {\n $closeElement.addClass(options.closeClass).attr('role', 'button');\n $toastElement.prepend($closeElement);\n }\n }\n\n function setProgressBar() {\n if (options.progressBar) {\n $progressElement.addClass(options.progressClass);\n $toastElement.prepend($progressElement);\n }\n }\n\n function setRTL() {\n if (options.rtl) {\n $toastElement.addClass('rtl');\n }\n }\n\n function shouldExit(options, map) {\n if (options.preventDuplicates) {\n if (map.message === previousToast) {\n return true;\n } else {\n previousToast = map.message;\n }\n }\n return false;\n }\n\n function hideToast(override) {\n var method = override && options.closeMethod !== false ? options.closeMethod : options.hideMethod;\n var duration = override && options.closeDuration !== false ?\n options.closeDuration : options.hideDuration;\n var easing = override && options.closeEasing !== false ? options.closeEasing : options.hideEasing;\n if ($(':focus', $toastElement).length && !override) {\n return;\n }\n clearTimeout(progressBar.intervalId);\n return $toastElement[method]({\n duration: duration,\n easing: easing,\n complete: function () {\n removeToast($toastElement);\n clearTimeout(intervalId);\n if (options.onHidden && response.state !== 'hidden') {\n options.onHidden();\n }\n response.state = 'hidden';\n response.endTime = new Date();\n publish(response);\n }\n });\n }\n\n function delayedHideToast() {\n if (options.timeOut > 0 || options.extendedTimeOut > 0) {\n intervalId = setTimeout(hideToast, options.extendedTimeOut);\n progressBar.maxHideTime = parseFloat(options.extendedTimeOut);\n progressBar.hideEta = new Date().getTime() + progressBar.maxHideTime;\n }\n }\n\n function stickAround() {\n clearTimeout(intervalId);\n progressBar.hideEta = 0;\n $toastElement.stop(true, true)[options.showMethod](\n {duration: options.showDuration, easing: options.showEasing}\n );\n }\n\n function updateProgress() {\n var percentage = ((progressBar.hideEta - (new Date().getTime())) / progressBar.maxHideTime) * 100;\n $progressElement.width(percentage + '%');\n }\n }\n\n function getOptions() {\n return $.extend({}, getDefaults(), toastr.options);\n }\n\n function removeToast($toastElement) {\n if (!$container) { $container = getContainer(); }\n if ($toastElement.is(':visible')) {\n return;\n }\n $toastElement.remove();\n $toastElement = null;\n if ($container.children().length === 0) {\n $container.remove();\n previousToast = undefined;\n }\n }\n\n })();\n });\n}(typeof define === 'function' && define.amd ? define : function (deps, factory) {\n if (typeof module !== 'undefined' && module.exports) { //Node\n module.exports = factory(require('jquery'));\n } else {\n window.toastr = factory(window.jQuery);\n }\n}));\n"],"names":["$","document","foundation","Rails","start","dispatchEvent","CustomEvent","each","this","hasClass","Toastr","warning","html","trim","error","success","errors","map","length","get","join","data","addClass","currentPathName","window","location","pathname","split","slice","item","find","path","URL","href","attr","fdatepicker","format","language","leftArrow","rightArrow","startDate","endDate","elements","querySelectorAll","Array","prototype","forEach","call","el","_i","addEventListener","event","file","target","files","type","match","reader","FileReader","previewElement","getAttribute","onload","e","content","concat","result","getElementById","innerHTML","parentElement","classList","contains","remove","readAsDataURL","removeClass","SwapZIndex","currentObject","reminderElements","style","zIndex","on","currentTarget","preventDefault","hide","hidden","productId","url","ajax","dataType","badgeExplanations","normal","large_company","mid_company","small_company","year","radioBtn","_loop","i","checked","value","querySelector","jQuery","fn","dates","days","daysShort","daysMin","months","monthsShort","today","titleFormat","$container","listener","previousToast","toastId","toastType","toastr","clear","$toastElement","clearOptions","options","getOptions","getContainer","clearToast","toastsToClear","children","clearContainer","removeToast","message","title","optionsOverride","notify","iconClass","iconClasses","info","subscribe","callback","version","create","containerId","positionClass","appendTo","createContainer","force","hideMethod","duration","hideDuration","easing","hideEasing","complete","publish","args","extend","preventDuplicates","shouldExit","intervalId","$titleElement","$messageElement","$progressElement","$closeElement","closeHtml","progressBar","hideEta","maxHideTime","response","state","startTime","Date","toastClass","suffix","escapeHtml","append","titleClass","setTitle","messageClass","setMessage","closeButton","closeClass","prepend","progressClass","rtl","newestOnTop","ariaValue","setAria","showMethod","showDuration","showEasing","onShown","timeOut","setTimeout","hideToast","parseFloat","getTime","setInterval","updateProgress","closeOnHover","hover","stickAround","delayedHideToast","onclick","tapToDismiss","click","stopPropagation","undefined","cancelBubble","onCloseClick","debug","console","log","source","replace","override","method","closeMethod","closeDuration","closeEasing","clearTimeout","onHidden","endTime","extendedTimeOut","stop","percentage","width","is"],"sourceRoot":""}