{"version":3,"sources":["webpack:///./app/javascript/public/general.js"],"names":["$","document","ready","endAudio","audioBtnElement","removeClass","$audio","find","get","pause","currentTime","$audioProgressBkg","css","change","this","is","addClass","click","event","getElementById","select","execCommand","alert","console","log","parents","targetId","data","hasClass","not","each","index","audioBtn","audioDuration","Math","round","duration","String","play","addEventListener","playAudio","copyFrom","createElement","textContent","location","href","bodyElm","getElementsByTagName","appendChild","retVal","removeChild","Swiper","slidesPerGroup","slidesPerView","spaceBetween","direction","effect","pagination","el","autoplay","delay","loop","navigation","nextEl","prevEl","length","sliderThumbnail","freeMode","watchSlidesVisibility","watchSlidesProgress","thumbs","swiper"],"mappings":"gFACAA,cAAGC,UAAWC,OAAM,WA2ChB,SAASC,EAASC,GACdA,EAAgBC,YAAY,cAC5B,IAAIC,EAASF,EAAgBG,KAAK,qBAAqBC,IAAI,GAC3DF,EAAOG,QACPH,EAAOI,YAAc,EAErB,IAAIC,EAAoBP,EAAgBG,KAAK,6BAC7CI,EAAkBC,IAAI,sBAAuB,MAC7CD,EAAkBN,YAAY,aAClC,CA3CAL,EAAE,uBAAuBa,QAAO,WAEvBb,EAAEc,MAAMC,GAAG,aAEZf,EAAE,qBAAqBK,YAAY,YACnCL,EAAE,0BAA0BK,YAAY,cAGxCL,EAAE,qBAAqBgB,SAAS,YAChChB,EAAE,0BAA0BgB,SAAS,YAE7C,IAEAhB,EAAE,mBAAmBiB,OAAM,SAASC,GACZjB,SAASkB,eAAe,kBAE9BC,SAEdnB,SAASoB,YAAY,QACrBC,MAAM,8BACV,IAIAtB,EAAE,4BAA4BiB,OAAM,WAChCM,QAAQC,IAAI,SACZxB,EAAEc,MAAMW,QAAQ,0BAA0BlB,KAAK,yBAAyBF,YAAY,UACpFL,EAAEc,MAAMW,QAAQ,0BAA0BlB,KAAK,mCAAmCF,YAAY,UAC9F,IAAIqB,EAAW,IAAM1B,EAAEc,MAAMa,KAAK,cAClC3B,EAAE0B,GAAUV,SAAS,UACrBhB,EAAEc,MAAME,S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OAAO,UAAW,CACnCQ,SAAU,CACNC,MAAO,KAEXC,MAAM,EACNC,WAAY,CACRC,OAAQ,oDACRC,OAAQ,qDAEZM,OAAQ,CACJC,OAAQL,IAbV,CAiBV,G","file":"js/115-1c5f61d18d3a1bbc5290.chunk.js","sourcesContent":["\n$( document ).ready(function(){\n\n var currentValue = 0;\n function handleClick(myRadio) {\n alert('Old value: ' + currentValue);\n alert('New value: ' + myRadio.value);\n currentValue = myRadio.value;\n }\n\n $('#registration-check').change(function() {\n // チェックが入っていたら有効化\n if ( $(this).is(':checked') ){ \n // ボタンを有効化\n $('#registration-btn').removeClass('disabled');\n $('#registration-line-btn').removeClass('disabled');\n } else { \n // ボタンを無効化\n $('#registration-btn').addClass('disabled'); \n $('#registration-line-btn').addClass('disabled'); \n }\n });\n\n $('.js-copy-button').click(function(event){\n var targetElement = document.getElementById(\"js-copy-target\");\n // 文字をすべて選択\n targetElement.select();\n // コピー\n document.execCommand(\"copy\");\n alert(\"successfuly copied the text\");\n });\n // $(function(){\n // setTimeout(\"$('.podsman-flash').fadeOut('slow')\", 2000);\n // });\n $('.user-rankings-nav__item').click(function(){\n console.log(\"click\")\n $(this).parents('.user-rankings-wrapper').find(\".user-rankings.active\").removeClass(\"active\")\n $(this).parents('.user-rankings-wrapper').find(\".user-rankings-nav__item.active\").removeClass(\"active\")\n var targetId = \"#\" + $(this).data('nav-target');\n $(targetId).addClass(\"active\")\n $(this).addClass(\"active\")\n });\n\n // サンプルボイス一覧での再生\n function endAudio(audioBtnElement) {\n audioBtnElement.removeClass('is-playing')\n var $audio = audioBtnElement.find(\".js-profile-audio\").get(0);\n $audio.pause();\n $audio.currentTime = 0;\n\n var $audioProgressBkg = audioBtnElement.find(\".user-voice__progress-bkg\")\n $audioProgressBkg.css(\"transition-duration\", \"0s\")\n $audioProgressBkg.removeClass(\"is-playing\")\n }\n\n function playAudio(audioBtnElement) {\n audioBtnElement.addClass(\"is-playing\")\n \n $(\".js-audio-play-btn\").not(audioBtnElement).each(function (index, audioBtn) {\n endAudio($(audioBtn))\n });\n\n var $audio = audioBtnElement.find(\".js-profile-audio\").get(0);\n var $audioProgressBkg = audioBtnElement.find(\".user-voice__progress-bkg\")\n var audioDuration = Math.round($audio.duration * .92) //実際のオーディより早くプログレスバーが進むように\n\n $audioProgressBkg.css(\"transition-duration\", String(audioDuration) + \"s\")\n $audioProgressBkg.addClass(\"is-playing\")\n\n $audio.play();\n // $audio.addEventListener(\"timeupdate\", function(){\n // }, false);\n $audio.addEventListener(\"ended\", function(){\n endAudio(audioBtnElement)\n }, false);\n }\n\n $('.js-audio-play-btn').click(function (event) {\n if($(this).hasClass(\"is-playing\")){\n endAudio($(this))\n }else{\n playAudio($(this))\n }\n // $(this).find(\".js-profile-audio\").play();\n return false;\n }); \n\n\n $('.js-coach-profile-detail__self-purchase-btn').click(function (event) {\n alert(\"自分のチケットは購入できません\");\n }); \n\n $('span[id=url-copy-btn]').click(function(){\n var copyFrom = document.createElement(\"textarea\");\n copyFrom.textContent = location.href;\n var bodyElm = document.getElementsByTagName(\"body\")[0];\n bodyElm.appendChild(copyFrom);\n copyFrom.select();\n var retVal = document.execCommand('copy');\n bodyElm.removeChild(copyFrom);\n alert('URLをコピーしました');\n return retVal;\n });\n\n var topSwiper1 = new Swiper ('#top-swiper-container-1', {\n // オプションパラメータ(一部のみ抜粋)\n slidesPerGroup: 1,\n slidesPerView: 1, // 何枚のスライドを表示するか\n spaceBetween: 0, // スライド間の余白サイズ(ピクセル)\n direction: 'horizontal', // スライド方向。 'horizontal'(水平) か 'vertical'(垂直)。effectオプションが 'slide' 以外は無効。\n effect: 'slide', // \"slide\", \"fade\"(フェード), \"cube\"(キューブ回転), \"coverflow\"(カバーフロー) または \"flip\"(平面回転)\n pagination: {\n el: '.swiper-pagination',\n },\n autoplay: {\n delay: 3000,\n },\n loop: true,\n // 前後スライドへのナビゲーションを表示する場合\n navigation: {\n nextEl: '#top-swiper-custom-parent-1 .swiper-button-next', // 次のスライドボタンのセレクタ\n prevEl: '#top-swiper-custom-parent-1 .swiper-button-prev', // 前のスライドボタンのセレクタ\n },\n });\n\n \n if( $('.swiper-slide--profile-thumb').length > 1 ) {\n //サムネイル\n var sliderThumbnail = new Swiper('#profile-swiper-custom-parent .slider-thumbnail', {\n slidesPerView: 6,\n freeMode: true,\n watchSlidesVisibility: true,\n watchSlidesProgress: true,\n });\n\n //スライダー\n var slider = new Swiper('.slider', {\n autoplay: {\n delay: 5000,\n },\n loop: true,\n navigation: {\n nextEl: '#profile-swiper-custom-parent .swiper-button-next',\n prevEl: '#profile-swiper-custom-parent .swiper-button-prev',\n },\n thumbs: {\n swiper: sliderThumbnail\n }\n });\n }\n});\n\n"],"sourceRoot":""}